public static final class NativeAllocation.Queue extends Object
| Constructor and Description |
|---|
Queue() |
| Modifier and Type | Method and Description |
|---|---|
void |
registerNativeAllocation(Object javaObject,
NativeAllocation.Destructor destructor)
Register a native
NativeAllocation.Destructor that should be called when some managed object dies. |
public void registerNativeAllocation(Object javaObject, NativeAllocation.Destructor destructor)
NativeAllocation.Destructor that should be called when some managed object dies.
The NativeAllocation.Destructor.destroy() method will be called after the javaObject becomes
unreachable from GC roots.
This will only happen if the NativeAllocation.Queue is still alive when the javaObject
dies. If the NativeAllocation.Queue dies before or at the same time as the javaObject, the
NativeAllocation.Destructor.destroy() method might not be called.
NativeAllocation.getGlobalQueue()