public class HybridData
extends java.lang.Object
#dispose
deletes the corresponding native object on whatever thread
the method is called on. In the common case when this is called by
HybridData#finalize(), this will be called on the system finalizer
thread. If you manually call resetNative() on the Java object, the C++
object will be deleted synchronously on that thread.Constructor and Description |
---|
HybridData() |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
boolean |
isValid() |
void |
resetNative()
To explicitly delete the instance, call resetNative().
|
public void resetNative()
finalize()
calls resetNative, the instance will not leak if this is
not called, but timing of deletion and the thread the C++ dtor is called
on will be at the whim of the Java GC. If you want to control the thread
and timing of the destructor, you should call resetNative() explicitly.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public boolean isValid()