This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Calling the garbage collector.
- From: "Chris Gray" <mbx03025 at scarlet dot be>
- To: "cr88192" <cr88192 at hotmail dot com>
- Cc: "aph" <aph at redhat dot com>, "abhi00" <abhi00 at gmail dot com>, "java" <java at gcc dot gnu dot org>
- Date: Mon, 27 Jul 2009 17:37:27 +0200
- Subject: Re: Calling the garbage collector.
-
> hmm...
>
> maybe Java needs 'delete'?...
As in "maybe the pope needs a wife"? :-)
Automatic garbage collection means you don't know when garbage will be
collected, it could even be "after the VM exits", i.e. never. Running all
finalizers when the VM exits has been tried, and it was a disaster.
http://www.velocityreviews.com/forums/t145751-finalize-not-guaranteed-to-be-called-ever.html
http://www.hpl.hp.com/personal/Hans_Boehm/popl03/slides.pdf
etc..
PS I'm happy to report that the Mika VM also does not run your finalizer. :-)
Chris Gray /k/ Embedded Java Solutions
_________________________________________
Scarlet Mobile, free subscription in combination with your Scarlet One or ADSL, visit http://www.scarlet.be/fr/mobile3g