原文是这样的; strong reachable; An object is strongly reachable if it can be reached by some thread without traversing any reference objects.a newly-created object is strongly reachable by the thread that created it.soft reachable: an object is softly reachable if it is not strongly reachable but can be reached by traversing a soft reference.weak reachable: an object is weakly reachable if it is neither strongly nor softly reachable but can be reached by traversing a weak reference.phantom reachable; an object is phantom reachable if it is neither strongly,softly nor weakly reahable,it has been finalized ,and some phantom reference refers to it.
Soft references are for implementing memory-sensitive caches, weak references are for implementing canonicalizing mappings that do not prevent their keys (or values) from being reclaimed, and phantom references are for scheduling pre-mortem cleanup actions in a more flexible way than is possible with the Java finalization mechanism.
谁有兴趣自己去下来看看就是了.
PhantomReference ?
SoftReference ?
WeakReference ?
strong reachable;
An object is strongly reachable if it can be reached by some thread without traversing any reference objects.a newly-created object is strongly reachable by the thread that created it.soft reachable:
an object is softly reachable if it is not strongly reachable but can be reached by traversing a soft reference.weak reachable:
an object is weakly reachable if it is neither strongly nor softly reachable but can be reached by traversing a weak reference.phantom reachable;
an object is phantom reachable if it is neither strongly,softly nor weakly reahable,it has been finalized ,and some phantom reference refers to it.