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

Method drop

rust/src/api/instance.rs:112–119  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

110
111impl Drop for Instance {
112 fn drop(&mut self) {
113 debug(&format!("Dropping an instance of {}", self.class_name));
114 if !self.skip_deleting_jobject {
115 if let Some(j_env) = cache::get_thread_local_env_opt() {
116 jni_utils::delete_java_ref(j_env, self.jinstance);
117 }
118 }
119 }
120}
121
122/// Instances contain global Java references and can be sent to other threads

Callers

nothing calls this directly

Calls 3

debugFunction · 0.85
get_thread_local_env_optFunction · 0.85
delete_java_refFunction · 0.85

Tested by

no test coverage detected