🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #41

Re: HELP! - one culprit appears to be JdbTextField

#41
From: David Sykes
Date: Wed, 30 Aug 2000 00:00
82 lines
3665 bytes
Please excuse the convoluted language of the previous post, as well as the
leftovers at the end....it is getting late on a long day.....
"David Sykes" <davidsykes_1972@hotmail.com> wrote in message
news:8ojmn8$g8h2@bornews.borland.com...
> Hello all,
>
> well after much searching and swearing I managed to find a case where I
can
> switch on or off the case of whether or not a JDialog gets cleaned up or
> not....and the culprit is JdbTextField.
>
> If I put a JdbTextField on my dialog, then the dialog will not be GC'ed.
> Every time I display my dialog I clean it up afterwards (dispose() ). One
> instance nevers gets cleaned up. If I put a normal JTextField on the
dialog
> instead, all instances get GC'ed. If I explicitly remove the JdbTextField
> control from its container during dispose(), then all instances get GC'ed.
>
> JFrame does not appear to be affected in the same way by the JdbTextField
> control....I am still searching for the culprit there.
>
> Can anyone from Borland perhaps explain why the last (or at least one)
> instance of a JDialog does not get GC'ed if it contains a JdbTextField?
>
> Thanks in advance,
> David Sykes
>
> well after much searching (and swearing) I managed to identify
JdbTextField
> as one culprit for the JFrame not being cleaned up. Actually in this case
it
> was a JDialog, I will check tomorrow to see if it is
> "David Sykes" <David.Sykes@franke.com> wrote in message
> news:8oibp6$3sd1@bornews.borland.com...
> > 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: <8ojmrm$g8h3@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8oibp6$3sd1@bornews.borland.com> <8ojmn8$g8h2@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,36ec239d24bc7696
X-Google-Attributes: gid111d45,public
X-Google-Thread: f74b3,36ec239d24bc7696
X-Google-Attributes: gidf74b3,public
From: "David Sykes" <davidsykes_1972@hotmail.com>
Subject: Re: HELP! - one culprit appears to be JdbTextField
Date: 2000/08/30
Message-ID: <8ojmrm$g8h3@bornews.borland.com>
X-Deja-AN: 664453004
References: <8oibp6$3sd1@bornews.borland.com> <8ojmn8$g8h2@bornews.borland.com>
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