public abstract class FinalizableWeakReference<T> extends WeakReference<T> implements FinalizableReference
finalizeReferent()
method which a background thread invokes after the garbage collector reclaims the referent. This is a simpler alternative to using a
ReferenceQueue
.
Modifier | Constructor and Description |
---|---|
protected |
FinalizableWeakReference(T referent, FinalizableReferenceQueue
Constructs a new finalizable weak reference.
|
clear, enqueue, get, isEnqueued
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
finalizeReferent
protected FinalizableWeakReference(T referent, FinalizableReferenceQueuequeue)
referent
- to weakly reference
queue
- that should finalize the referent