posted 24 years ago
No, there is no way to "inspect" an object to see if it is eligible for GC( and going to get garbage collected soon ). On the brighter side, you can however, override the <code>finalize</code> method which the VM calls when the object is about to get garbage-collected. This means, any code in the overridden <code>finalize</code> method gets called ONLY WHEN the object is going to get collected.
Ajith
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).