Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Albireo » Memory leak
Memory leak [message #10989] Mon, 25 May 2009 03:43
Reto Urfer is currently offline Reto Urfer
Messages: 6
Registered: July 2009
Junior Member
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
Previous Topic:Size-Calculation of Embedded Swing Controls in Dialogs
Next Topic:Memory leak
Goto Forum:
  


Current Time: Sat Aug 30 12:28:47 EDT 2014

Powered by FUDForum. Page generated in 0.03514 seconds