Daniel Dekany wrote:
Monday, December 15, 2003, 12:40:58 AM, Stephen McConnell wrote:
Daniel Dekany wrote:[snip]
[snip]So the question is - "is a JVM required to invoke finalize (where finalize is overriden) on all objects objects on the stack for existing (or the more specific case of invoking finalize on all objects in the finalizable queue). My understanding is that "best efforts" can be assumed relative to the JLS, but that implementions take this to extreme imposed by the application.So what? If ref.get() == null, you only know that it is "at least queued for finalization". But, again, it does not means that the finalization will actually happen. Because, even if the object is queued for finalization, the VM can terminate before actually doing that. Or is it the VM required to finalize all queued objects before terminating? (Point that sentence in the specs.)
In particular we have the following (implementation) reference:
System.runFinalization():
"Deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock."
The System.runFinalization() is not depricated - at least according to the 1.4.2 documentation. Maybe your thinkinbg of the runFinializationOnExt( boolean ) which is deprecated.
Cheers, Steve.
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/ | |------------------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
