Deletes the java ref from the memory
(jni_env: *mut JNIEnv, jinstance: jobject)
| 251 | |
| 252 | /// Deletes the java ref from the memory |
| 253 | pub(crate) fn delete_java_local_ref(jni_env: *mut JNIEnv, jinstance: jobject) { |
| 254 | unsafe { |
| 255 | let dlr = (**jni_env).v1_6.DeleteLocalRef; |
| 256 | let exc = (**jni_env).v1_6.ExceptionCheck; |
| 257 | let exd = (**jni_env).v1_6.ExceptionDescribe; |
| 258 | let exclear = (**jni_env).v1_6.ExceptionClear; |
| 259 | dlr(jni_env, jinstance); |
| 260 | if (exc)(jni_env) == JNI_TRUE { |
| 261 | if logger::is_console_debug_enabled() { |
| 262 | (exd)(jni_env); |
| 263 | } |
| 264 | (exclear)(jni_env); |
| 265 | error( |
| 266 | "An Exception was thrown by Java... Please check the logs or the console.", |
| 267 | ); |
| 268 | } |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | pub(crate) fn global_jobject_from_str( |
| 273 | string: &str, |
no test coverage detected