|
|
Re: references
|
Posted: Oct 16, 2007 10:28 PM
|
|
When an object is reachable from the root set by some chain of ordinary references (no reference objects involved), that object is said to be strongly reachable.
The Reference Object API gives us strength of the object reachability. We can have softly, weakly and phantomly reachable objects and gain a limited amount of interaction with the garbage collector according to the strength of the object's reachability.
If the only ways to reach an object involve at least one weak reference object, the object is said to be weakly reachable. An object is considered by the garbage collector to be in use if it is strongly reachable. Weakly reachable objects, like unreachable objects, are eligible for collection.
The java.sun site has a good article on Strong and weak reference.
Here is a link http://java.sun.com/developer/technicalArticles/ALT/RefObj/
Please have a look,
|
|