[5636] in java-interest
Re: Finalize Broken?
daemon@ATHENA.MIT.EDU (Jim.Graham@Eng.Sun.COM)
Tue Feb 20 20:27:43 1996
Date: Tue, 20 Feb 1996 15:22:36 -0800
To: java-interest@java.Eng.Sun.COM, mikea@ai.mit.edu
From: Jim.Graham@Eng.Sun.COM
> Everytime the testing() method is run, a new tryer object is created.
> Therefore, when the method is done, it should be collected - thereby
> executing the finalize() method.
The finalize() method will be called the next time that Garbage Collection
is done. Unreferenced objects are not immediately collected. If you
put a call to "System.gc()" after each call to "testing()", then you
should see the finalizer getting called. If you put one call to System.gc()
at the end of the main() method, then you should see both finalizers called
together there...
...jim
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com