sun的官方文档里看到的,感觉能理解一点,但又不是很清晰,所以想请教一下各位大虾.

解决方案 »

  1.   

    sun中国社区有一个视频将jvm内存管理的,讲的就是这些内容,只是我没怎么仔细看 :)
    谁有兴趣自己去下来看看就是了.
      

  2.   

    Reference ?
    PhantomReference ?
    SoftReference ?
    WeakReference ?
      

  3.   

    原文是这样的;
    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.
      

  4.   

    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.