Class Pointer.DeallocatorReference

java.lang.Object
java.lang.ref.Reference<Pointer>
java.lang.ref.PhantomReference<Pointer>
org.bytedeco.javacpp.Pointer.DeallocatorReference
All Implemented Interfaces:
Pointer.Deallocator, Pointer.ReferenceCounter
Direct Known Subclasses:
Pointer.CustomDeallocator, Pointer.NativeDeallocator, Pointer.ProxyDeallocator
Enclosing class:
Pointer

static class Pointer.DeallocatorReference extends PhantomReference<Pointer> implements Pointer.Deallocator, Pointer.ReferenceCounter
A subclass of PhantomReference that also acts as a linked list to keep their references alive until they get garbage collected. Also keeps track of total allocated memory in bytes, to have it call System.gc() when that amount reaches Pointer.maxBytes, and implements reference counting with an AtomicInteger count.