public interface ObjectHandles
ObjectHandles
. The handles returned by ObjectHandles.create()
are bound to the
creating handle set, i.e., the handle can only be accessed
and destroyed
using the exact same handle set used for creation.Modifier and Type | Method and Description |
---|---|
static ObjectHandles |
create()
Creates a new set of handles.
|
ObjectHandle |
create(Object object)
Creates a handle to the specified object.
|
void |
destroy(ObjectHandle handle)
Destroys the given handle.
|
<T> T |
get(ObjectHandle handle)
Extracts the object from a given handle.
|
static ObjectHandles |
getGlobal()
A set of handles that is kept alive globally.
|
static ObjectHandles getGlobal()
static ObjectHandles create()
ObjectHandles
instance gets unreachable.ObjectHandle create(Object object)
ObjectHandles.destroy(org.graalvm.nativeimage.ObjectHandle)
is called for the returned handle. The object can be null.<T> T get(ObjectHandle handle)
void destroy(ObjectHandle handle)