protected static class Pointer.CustomDeallocator extends java.lang.ref.PhantomReference<Pointer>
Pointer.Deallocator that calls, during garbage collection, a method with signature
static void deallocate() from the Pointer object passed to the constructor
and that accepts it as argument. Uses reflection to locate and call the method.Pointer.withDeallocator(Pointer)| Constructor and Description |
|---|
CustomDeallocator(Pointer p) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
int |
count() |
void |
deallocate() |
boolean |
release() |
void |
retain() |
java.lang.String |
toString() |
public CustomDeallocator(Pointer p)
public void deallocate()
deallocate in interface Pointer.Deallocatorpublic java.lang.String toString()
public void clear()
clear in class java.lang.ref.Reference<Pointer>public void retain()
retain in interface Pointer.ReferenceCounterpublic boolean release()
release in interface Pointer.ReferenceCounterpublic int count()
count in interface Pointer.ReferenceCounter