Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311605

Summary: CalendarCombo memory leak
Product: z_Archived Reporter: Eric Jain <eric.jain>
Component: NebulaAssignee: Emil Crumhorn <emil.crumhorn>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: sharonbsnyder, spall, wim.jongman
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch is based on 11/14/2011 - nightly and works for e4 none

Description Eric Jain CLA 2010-05-04 14:54:15 EDT
Build Identifier: 20100218-1602

CalendarCombo instances appear to never be GC'd. Looks like there is a listener somewhere that never gets removed?

this$0 of org.eclipse.nebula.widgets.calendarcombo.CalendarCombo$15 (0x5556b612)
  eventListener of org.eclipse.swt.widgets.TypedListener (0x5556b55c)
    element of org.eclipse.swt.widgets.Listener[ ] (0x5556b550)
      listeners of org.eclipse.swt.widgets.EventTable (0x5556b54f)
        eventTable of org.eclipse.swt.widgets.Shell (declared by org.eclipse.swt.widgets.Widget) (0x5555ef51)
          shell of org.eclipse.ui.internal.WorkbenchWindow (declared by org.eclipse.jface.window.Window) (0x5555ee17)
            activatedWindow of org.eclipse.ui.internal.Workbench (0x555555af)
              static workbench of class org.eclipse.ui.internal.StartupThreading (0xfffff06a)

Reproducible: Always
Comment 1 Andreas Spall CLA 2011-11-15 09:41:41 EST
Created attachment 207030 [details]
Patch is based on 11/14/2011 - nightly and works for e4
Comment 2 Andreas Spall CLA 2011-11-15 09:49:33 EST
We had the same listener and GC problem with eclipse 4.1 and a CSSSWTEngineImpl related memory leak (see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=318944). both where fixed with the attached and changed CalendarCombo. feel free to use the changes.
Comment 3 Sharon Snyder CLA 2012-02-29 09:08:47 EST
I found the same thing.  Any listener you add needs to be removed.  My workaround was to add a dispose listener and when I receive that I remove any listeners I added.  This seems to allow it to be garbage collected.
Comment 4 Wim Jongman CLA 2013-06-21 16:13:23 EDT
CalendarCombo will be archived june 30 2013.
Please update your software to use Nebula CDateTime or SWT DateTime.
Closing as WONTFIX.