/** * Reclaims native resources used by this NativeObject. * It should be safe to call this method or even use the object * after it has been reclaimed, unless {@link NativeObjectManager#UNSAFE} is * set to true, in that case native buffers are also reclaimed which may * introduce instability. */ public void dispose() { if (objectManager != null) { objectManager.enqueueUnusedObject(this); } } }
/** * Reclaims native resources used by this NativeObject. * It should be safe to call this method or even use the object * after it has been reclaimed, unless {@link NativeObjectManager#UNSAFE} is * set to true, in that case native buffers are also reclaimed which may * introduce instability. */ public void dispose() { if (objectManager != null) { objectManager.enqueueUnusedObject(this); } } }