Q&A
Q&AWhen are WeakReference, SoftReference, and PhantomReference useful?
They express different reachability and cleanup relationships, but are not general-purpose cache policies.
Read the concise answer
Weak references do not keep an object alive and are useful in structures such as canonicalizing maps when carefully designed. Soft references may be cleared under memory pressure, but their timing is not a predictable cache eviction policy. Phantom references support post-mortem cleanup coordination through a reference queue; they do not let code retrieve the referent.