protected static class Pointer.CustomDeallocator extends Pointer.DeallocatorReference implements Pointer.Deallocator
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)
Modifier and Type | Field and Description |
---|---|
(package private) Method |
method |
(package private) Pointer |
pointer |
bytes, deallocator, head, next, prev, totalBytes
Constructor and Description |
---|
CustomDeallocator(Pointer p) |
Modifier and Type | Method and Description |
---|---|
void |
deallocate() |
String |
toString() |
add, clear, remove
get
enqueue, isEnqueued
public CustomDeallocator(Pointer p)
public void deallocate()
deallocate
in interface Pointer.Deallocator
public String toString()
toString
in class Pointer.DeallocatorReference
Copyright © 2019. All rights reserved.