关于 java Phantom Reference 的一些参考文章

Java 里面有4种Reference types, 从强到若, 依次为 Strong, Soft, Weak, Phantom. 其中Java API 暴露出后三种Reference 类型在 JDK 包中. 这些Reference 类型提供了与GC程序的有限的交互.

与之对应的有4种 GC 对内存对象的Reachable:
Strong Reachable:
Soft Reachable:
Weak Reachable:
Phantom Reachable:

参考:
http://javarevisited.blogspot.com/2014/03/difference-between-weakreference-vs-softreference-phantom-strong-reference-java.html
http://docs.oracle.com/javase/6/docs/api/index.html?java/lang/ref/Reference.html
https://weblogs.java.net/blog/2006/05/04/understanding-weak-references
http://www.cnblogs.com/blogoflee/archive/2012/03/22/2411124.html
https://weblogs.java.net/blog/kcpeppe/archive/2011/09/29/mysterious-phantom-reference
http://stackoverflow.com/questions/1599069/have-you-ever-used-phantom-reference-in-any-project
http://java.dzone.com/articles/finalization-and-phantom

标签: none

添加新评论