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.Deallocatorthat 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.Methodmethod(package private) Pointerpointer-
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 voiddeallocate()java.lang.StringtoString()
-
-
-
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:
deallocatein interfacePointer.Deallocator- Overrides:
deallocatein classPointer.DeallocatorReference
-
toString
public java.lang.String toString()
- Overrides:
toStringin classPointer.DeallocatorReference
-
-