From fea8341ff36a9a3b1a27d3e45c520f3cfe3e331d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 5 May 2022 08:57:05 +0200 Subject: JavaGlobalObj::dtor: Hold JNIGlobalRef lock while fetching jobject and call into java mNotifyDeleted --- include/jau/jni/jni_mem.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'include/jau/jni') diff --git a/include/jau/jni/jni_mem.hpp b/include/jau/jni/jni_mem.hpp index ba5a282..b99f68a 100644 --- a/include/jau/jni/jni_mem.hpp +++ b/include/jau/jni/jni_mem.hpp @@ -80,6 +80,7 @@ extern thread_local JNIEnvContainer jni_env; */ class JNIGlobalRef { private: + friend class JavaGlobalObj; mutable std::mutex mtx; jobject object; -- cgit v1.2.3