Package org.bytedeco.javacpp
Class Pointer.CustomDeallocator
- java.lang.Object
-
- java.lang.ref.Reference<T>
-
- java.lang.ref.PhantomReference<Pointer>
-
- org.bytedeco.javacpp.Pointer.DeallocatorReference
-
- org.bytedeco.javacpp.Pointer.CustomDeallocator
-
- All Implemented Interfaces:
Pointer.Deallocator
,Pointer.ReferenceCounter
- Enclosing class:
- Pointer
protected static class Pointer.CustomDeallocator extends Pointer.DeallocatorReference
APointer.Deallocator
that calls, during garbage collection, a method with signaturestatic void deallocate()
from the Pointer object passed to the constructor and that accepts it as argument. Uses reflection to locate and call the method.- See Also:
Pointer.withDeallocator(Pointer)
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.reflect.Method
method
(package private) Pointer
pointer
-
Fields inherited from class org.bytedeco.javacpp.Pointer.DeallocatorReference
bytes, count, deallocator, head, next, prev, totalBytes, totalCount
-
-
Constructor Summary
Constructors Constructor Description CustomDeallocator(Pointer p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deallocate()
java.lang.String
toString()
-
-
-
Field Detail
-
pointer
Pointer pointer
-
method
java.lang.reflect.Method method
-
-
Constructor Detail
-
CustomDeallocator
public CustomDeallocator(Pointer p)
-
-
Method Detail
-
deallocate
public void deallocate()
- Specified by:
deallocate
in interfacePointer.Deallocator
- Overrides:
deallocate
in classPointer.DeallocatorReference
-
toString
public java.lang.String toString()
- Overrides:
toString
in classPointer.DeallocatorReference
-
-