The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

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:

GC only calls finalize when I print something first?

Posted by David Pinhasik on November 29, 2001 at 10:40 AM

HI, I am new to Java. In "Thinking in Java" by Bruce Eckel, I am doinfg one of the excercises on garbage collection and finalize(). I noticed that my finalize() is not called unless i have a System.out.printlin("gc"); before the System.gc() call. Bruce also has this print in his example. Any ideas?

David



Replies:

Sponsored Links



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