Recent articles:
Popular archives:
Java: A platform for platforms
Sun's reorg may seem promising to shareholders but it's also a scramble for position. The question now is whether Sun can,
or wants to, maintain its hold on Java technology. Especially with enterprise leaders like SpringSource and RedHat investing
heavily in Java's future as a platform for platforms
Also see:
Discuss: Tim Bray on 'What Sun Should Do'
finalize() method.
finalize() method.
These tips and cautions will help you write better programs and save you from agonizing over error messages produced by the compiler.
finalize() methods with super.finalize(); method calls. That way, if you insert a superclass above your class and if that superclass has its own finalize() method, you can be sure the garbage collector calls superclass's finalize() method.
System.runFinalization (); immediately after a call to System.gc ();. If you place System.runFinalization (); before System.gc (); or omit the System.gc (); call, not all finalize() methods will run. (I do not know the reason for this.)
finalize() method.
You might be wondering why I did not include instance (that is, object) fields in the root set of references. The reason is that, unlike class fields (which are always accessible through a program's lifetime) and local variables/parameters (which are always accessible during a method call), instance fields become inaccessible to the garbage collector when an object becomes unreachable.