Top Description Constructors
com.google.common.base

public abstract Class FinalizableWeakReference<T>

extends WeakReference<T>
implements FinalizableReference
Class Inheritance
All Implemented Interfaces
com.google.common.base.FinalizableReference
Annotations
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtIncompatible, .J2ktIncompatible, java.lang.ref.ReferenceQueue, .WeakReference, javax.annotation.CheckForNull

Weak reference with a finalizeReferent() method which a background thread invokes after the garbage collector reclaims the referent. This is a simpler alternative to using a ReferenceQueue.
Author
Bob Lee
Since
2.0

Constructor Summary

AccessConstructor and Description
protected
FinalizableWeakReference(T
to weakly reference
referent
,
FinalizableReferenceQueue
that should finalize the referent
queue
)

Constructs a new finalizable weak reference.

Constructor Detail

FinalizableWeakReferenceback to summary
protected FinalizableWeakReference(T referent, FinalizableReferenceQueue queue)

Constructs a new finalizable weak reference.

Parameters
referent:T

to weakly reference

queue:FinalizableReferenceQueue

that should finalize the referent