Struct jni::objects::GlobalRef
[−]
[src]
pub struct GlobalRef { /* fields omitted */ }
A global JVM reference. These are "pinned" by the garbage collector and are
guaranteed to not get collected until released. Thus, this is allowed to
outlive the JNIEnv
that it came from. Still can't cross thread boundaries
since it requires a pointer to the JNIEnv
to do anything useful with it.
Methods
impl GlobalRef
[src]
unsafe fn new(env: *mut JNIEnv, obj: jobject) -> Self
Create a new global reference object. This assumes that
CreateGlobalRef
has already been called.