RSS feed [root] /document /java /discussion




login:

password:

title search:




 


Fri Dec 07 16:00:00 GMT 2001

java_finalize



However, finalize() does not run (at least on my platform) because the garbage collector only runs at intervals, and the program exits before the garbage collector has a chance to run. As a result, one unreachable FinalizeDemo1 object remains on the heap when the program exits. That behavior proves that finalize() is not Java's equivalent of a destructor. After all, a language must guarantee that a call is made to every object's destructor (when that destructor is present). In contrast, Java does not guarantee that a call is made to every object's finalize() method.



(google search) (amazon search)
second
download zip of files only