Understanding Java's Reference classes: SoftReference, WeakReference, and PhantomReference

前端 未结 4 2013
星月不相逢
星月不相逢 2020-11-30 17:30

Can someone explain the difference between the three Reference classes (or post a link to a nice explanation)? SoftReference > WeakReference >

4条回答
  •  南笙
    南笙 (楼主)
    2020-11-30 18:09

    It should also be mentioned, as stated on the comment by Truong Xuan Tinh, here: http://blog.yohanliyanage.com/2010/10/ktjs-3-soft-weak-phantom-references/

    That JRockit JVM implements weak/soft/phantom references differently than Sun JVM.

提交回复
热议问题