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
.限定符 | 构造器和说明 |
---|---|
protected |
FinalizableWeakReference(T referent,
FinalizableReferenceQueue queue)
Constructs a new finalizable weak reference.
|
protected FinalizableWeakReference(T referent, FinalizableReferenceQueue queue)
referent
- to weakly referencequeue
- that should finalize the referentCopyright © 2021. All rights reserved.