[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.albireo] Memory leak

Hi

I am using SwingControl on a page of a multi page editor in a RCP 
application. I noticed that the Control derived from SwingControl is NOT 
garbage collected. The result is that the user has to stop the application 
after a certain time because it consumes to much memory. I reported already 
a bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=275811) but got no 
answer.

I could find two problems in the implementation of SwingControl:
1. The method handleDispose is missing the code
      getShell().removeControlListener(shellControlListener);
2. The method addRootPaneContainer contains the line
      frame.add(applet);
   This line contains the reason why the the instance of MySwingComposite 
will
not be garbage collected. Unfortunately i was not able to find a fix for 
this
problem yet. (I commented this line temporarily out and then, together with 
the
change in the handleDispose method the garbage collector was able to remove 
the
instance of MySwingComposite from the heap!)

Anybody an idea why the frame can not be garbage collected as soon as the 
applet has been added to it?

Thanks
Reto