MCPcopy Create free account
hub / github.com/astonbitecode/j4rs / _weak_ref

Method _weak_ref

rust/src/api/instance.rs:84–93  ·  view source on GitHub ↗

Creates a weak reference of this Instance.

(&self)

Source from the content-addressed store, hash-verified

82
83 /// Creates a weak reference of this Instance.
84 fn _weak_ref(&self) -> errors::Result<Instance> {
85 Ok(Instance {
86 class_name: self.class_name.clone(),
87 jinstance: jni_utils::_create_weak_global_ref_from_global_ref(
88 self.jinstance,
89 cache::get_thread_local_env()?,
90 )?,
91 skip_deleting_jobject: false,
92 })
93 }
94}
95
96impl TryFrom<InvocationArg> for Instance {

Callers

nothing calls this directly

Tested by

no test coverage detected