The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
May 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Forcing garbage collection

Posted by Joe on May 31, 2001 at 6:08 PM

FYI, According to Roberts, et al. (coauthor of the Sun approved certification exams) "Garbage collection cannot be forced. Calling System.gc() or Runtime.gc() is not 100 percent reliable, since the garbage-collection thread might defer to a thread of higher priority."

> > So we would like to unlod or have the properties garbage collected
> > once we are done with them. Setting them to null doesn't seems
> > to do the trick...we are using JDK 1.1.8 by the way.

> Did you try to force executing the garbage collection by calling System.gc() (Runtime.getRuntime().gc)?






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us