You mis-understood.  Rephrasing, you cannot count on Java to call the
finalize method if it has not has not yet decided to garbage collect the
object.


I would explain it that you cannot guarantee when Java will decide to garbage collect /this/ object. Even an explicit call to System.gc() does:

OK, yes I understand that you cannot guarantee when an object will be garbage collected, but does java not guarantee that everything will be garbage collected eventually? Even if that is not until program exit? To be honest, I'm not sure about this. I'd certainly hope any reasonable implementation would do this. Too expectant?


Obviously if you have expensive resources tied up you probably want to guarantee that they get released in a much more timely fashion ;)

Cheers
Kerr

--
Kerr Rainey - [EMAIL PROTECTED] - http://www.rokera.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to