You may also being holding references to objects that you thought you
had released. An object will not be garbage collected if there are any
live references to it. In Java you can't have traditional memory leaks,
but you can have unintentional object retention. Caching systems and
event notifications registrations are two common places where this can
happen. Code walk throughs and the use a heap analysis tool can help. I
believe that you can get a heap analysis tool, called HAT, from Sun's
Java web site.

Carles

Reisman Jason wrote:
>
> That is correct.  System.gc() will attempt to wake up the garbage
> collection thread, but doesn't guarantee that it will run at that
> instant.
> However, you're missing the real problem: if you are getting to the
> point that you may need to force a garbage collection you should
> either (a) manage the number of objects that you're creating, or (b)
> limit the size of your objects.  Doing either may help with your
> problem.
> jR
>
>  Taylor Gautier
>  <[EMAIL PROTECTED]>                    To:
>  Sent by: A mailing list about Java   [EMAIL PROTECTED]
>  Server Pages specification and              cc:
>  reference                                   Subject:        Re:
>  <[EMAIL PROTECTED]>         Garbage collection
>
>  11/04/99 02:26 PM
>  Please respond to Taylor Gautier
>
> That doesn't FORCE garbage collection.  Just suggests that if the GC
> would
> like to run, it can.
>
> -tg
> ----- Original Message -----
> From: Pedro Teixeira <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 04, 1999 10:51 AM
> Subject: Re: Garbage collection
>
> > Tao Kang wrote:
> >
> > > No.  You cannot force garbage collection.
> >
> > No? What about java.lang.System.gc() ?
> >
> > --
> >
> > #################
> > Pedro Teixeira
> > USD
> > Link<-
> >
> > Tao Kang wrote:
> >
> > No.  You cannot force garbage collection.  However, you can make an
> > object to become 'subject to'
> > garbage collection by making it 'unreachable.'  (assigning the
> reference
> > varaible to null, for example)
> >
> > Because the garbage collector runs asynchronously to your program as
> a
> > separate thread, you cannot
> > predict when it will execute, which unreachable objects it will
> reclaim,
> > and when it will reclaim those
> > objects.
> >
> > Tae
> >
> >
> ===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > FAQs on JSP can be found at:
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to