Board index » jbuilder » Re: Garbage Collection HELP

Re: Garbage Collection HELP


2003-06-25 11:14:25 PM
jbuilder17
Patrick,
I have the same problem with JFrame components. The this$0 references
appear to be related to listeners that you have added. If you remove all
listeners when the component closes they will go away. The "parent" and
"nativeContainer" references appear to be internal to swing and there does
not seem to be anyway to get rid of them. I believe this is a rather {*word*193}
Swing bug.
Regards
Simon
"Patrick Johnson" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

I have a dbswing application built with JB6/Pro. JDK 1.4.1.

Over time, it runs out of memory.

From what I can determine, the JinternalFrames and JDialogs are piling
up like old magazines, and never getting garbage collected. I have
tried to remove the references to them, but there are a few that are
still there, and apparently prevent garbage collection. Here is the
JProfiler dump for one of the windows (a JDialog subclass):

www.technoscope.com/gc.gif

These dialogs have been closed, and are set to DISPOSE_ON_CLOSE.

Help! How do I get rid of those references ? Is this some kind of
problem with anonymous inner classes ? The same issue exists with all
of my dialogs, so the application has to be restarted every hour or so.

Thanks,
Patrick
 
 

Re:Re: Garbage Collection HELP

On 6/25/2003 at 11:14:25 AM, Simon Bisson wrote:
Quote
The this$0 references appear to be related to listeners that you
have added.
"this$0" is a synthetic variable created for inner classes. It points
to the enclosing class instance. Since listeners are often inner
classes, they would have a this$0 that refers to the enclosing class.
Quote
The "parent" and "nativeContainer" references appear to be internal
to swing and there does not seem to be anyway to get rid of them.
I believe this is a rather {*word*193} Swing bug.
I have not seen anything concerning the use of these two members that
indicates a bug. Do you have an example program where you think this
is occurring?
--
Regards,
John McGrath [TeamB]