Object lifetime

Per Bothner bothner at cygnus.com
Sat May 3 17:13:09 PDT 1997

> According to my understanding of the Java Language Spec this object is doomed to be collected right soon:
>  new foo ();
> as there's no reference to it.

No.  There is a no guarantee when garbage collection happens.
If you have plenty of memory, it may never happen.

In a language like Limbo, then (non-cyclic) garbage is guaranteed 
to be collected promply.  But that is not the case for Java.

	--Per Bothner
Cygnus Solutions     bothner at cygnus.com     http://www.cygnus.com/~bothner

More information about the kaffe mailing list