Article View: borland.public.jbuilder.java.swing
Article #43HELP! JFrames not being GC'ed
From: David Sykes
Date: Wed, 30 Aug 2000 00:00
Date: Wed, 30 Aug 2000 00:00
32 lines
1902 bytes
1902 bytes
Hello all, I have just noticed that the JFrames in my application are not being garbage collected. Arrggghhhh!! Consequently the memory consumption of my application only ever goes up. This is bad.... I am using OptimizeIt 3.11 to track references to the frame objects to try and find out why they are not being freed. After closing the frame, dispose() is called. The references to the object that remain are: referent of java.lang.ref.Finalizer focusRoot of java.awt.FocusManager referent of java.lang.ref.WeakReference (x2) parent of javax.swing.JRootPane nativeHost of java.awt.Component$NativeInLightFixer nativeContainer of java.awt.LightweightDispatcher this$0 of pbs.system.standard.gui.frame.StdFrame$n (where n is a number - these I assume are from the anonymous event handlers: there are several of these) The pbs.system.standard.gui.frame.StdFrame is the base class of the frame I am displaying. Which of these references is causing my frame not to be GC'ed, and how can I get rid of them? A simple test frame I have created which is also referenced by anonymous and standard event handling classes, as well as by a WeakReference gets cleaned up properly. Why not this one? Thanks in advance for any assistance, David Sykes
Technical Details
Message-ID:
<8oibp6$3sd1@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,36ec239d24bc7696,start X-Google-Attributes: gid111d45,public X-Google-Thread: f74b3,36ec239d24bc7696,start X-Google-Attributes: gidf74b3,public From: "David Sykes" <David.Sykes@franke.com> Subject: HELP! JFrames not being GC'ed Date: 2000/08/30 Message-ID: <8oibp6$3sd1@bornews.borland.com> X-Deja-AN: 664221496 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing,borland.public.jbuilder.java.language