JInternalFrame memory leaks

Hello, I need help on a bug on the JInternalFrame that SUN have fixed. I'm using in a my own DesktopPane and my own JInternalFrame in a MDI application. On each JInternalFrame created, I have different listener that is rerferer to this JInternalFrame. When I'm closing the JInternalFrame, I remove it from the DesktopPane, and I'm disposing of the JInternalFrame, but references still exist on the JInternalFrame and the memory of this object is not free. In the BasicInternalFrameUI, SUN have implemented the uninstallListeners() method, but this method is protected (see at: http://java.sun.com/j2se/1.3/docs/guide/swing/MDIChanges.html) .....how can I access it ? I have try to define my own class extending the BasicInternalFrameUI, but it is impossible, the class does not have a parameters less constructor. I have also try to extends from the InternalFrameUI, but in this case, how can I override or access the uninstallListener() method of the BasicInternalFrameUI ?

In both case I'm in deep trouble. Is there anyone that have face the same problem ?

If someone have a solution, please propose it to me.

vincent.thibaudeau@sita.int

[1175 byte] By [vinnyweb] at [2007-9-26 13:02:36]
# 1

This problem am facing with my application where I have to open JInternalFrame for each Transaction on the application. Now I just found a message in one of the forums, and they were sugesting the following:

Remove all listeners from all containers added on the internalframe"using removeAll()"

Also remove from the container which can be optained from getContentPane()

Next is to dispose the internal frame and set it to null.

Don't use anonymous class.

Am still working on this and see if it is gonna work.

aiMen at 2007-7-2 12:54:20 > top of Java-index,Other Topics,Java Community Process (JCP) Program...