Top Description Constructors Methods
jnr.ffi.util.ref

public abstract Class FinalizablePhantomReference<T>

extends PhantomReference<T>
implements FinalizableReference
Class Inheritance
All Implemented Interfaces
jnr.ffi.util.ref.FinalizableReference
Known Direct Subclasses
jnr.ffi.provider.jffi.TransientNativeMemory.Magazine
Imports
java.lang.ref.PhantomReference

Phantom 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 java.lang.ref.ReferenceQueue.

Unlike a normal phantom reference, this reference will be cleared automatically.

Author
Bob Lee
Since
2.0 (imported from Google Collections Library)

Constructor Summary

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

Constructs a new finalizable phantom reference.

Method Summary

Inherited from java.lang.ref.PhantomReference:
get

Constructor Detail

FinalizablePhantomReferenceback to summary
protected FinalizablePhantomReference(T referent, FinalizableReferenceQueue queue)

Constructs a new finalizable phantom reference.

Parameters
referent:T

to phantom reference

queue:FinalizableReferenceQueue

that should finalize the referent