protected static class Pointer.CustomDeallocator extends Pointer.DeallocatorReference
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, count, deallocator, head, next, prev, totalBytes, totalCount
Constructor and Description |
---|
CustomDeallocator(Pointer p) |
Modifier and Type | Method and Description |
---|---|
void |
deallocate() |
String |
toString() |
add, clear, count, release, remove, retain
get
clone, enqueue, isEnqueued
public CustomDeallocator(Pointer p)
public void deallocate()
deallocate
in interface Pointer.Deallocator
deallocate
in class Pointer.DeallocatorReference
public String toString()
toString
in class Pointer.DeallocatorReference
Copyright © 2024. All rights reserved.