虚引用和对象的生命周期无关。
Phantom reference has nothing to do with the life cycle of an object.
弱引用、软引用和虚引用允许灵活的缓存,能够改进应用程序的内存特性。
Weak, soft, and phantom references can improve the memory characteristics of your application by allowing flexible caching.
而且,内存中的一个对象可以被多个引用(可以是强引用、软引用、弱引用或虚引用)引用。
Furthermore, an object in memory can be referenced by multiple references that could be strong, soft, weak, or phantom. Before proceeding further, let's look at some terminology.
应用推荐