From 8ab1515efd2195933fd1f55664f7d1c7ee0bf4d6 Mon Sep 17 00:00:00 2001 From: Stasonych Date: Wed, 10 Jun 2026 17:44:08 +0500 Subject: [PATCH] fix error on MacOS when the application shuts down SIGSEGV (0xb) [libwebrtc-java18303957598948959776.dylib+0xa34f4] Java_dev_onvoid_webrtc_media_video_desktop_WindowCapturer_initialize+0x64f94 # --- .../src/main/cpp/dependencies/jni-voithos/include/JavaEnum.h | 1 + .../src/main/cpp/dependencies/jni-voithos/include/JavaFactory.h | 1 + 2 files changed, 2 insertions(+) diff --git a/webrtc-jni/src/main/cpp/dependencies/jni-voithos/include/JavaEnum.h b/webrtc-jni/src/main/cpp/dependencies/jni-voithos/include/JavaEnum.h index 89dadd09..76dccb09 100644 --- a/webrtc-jni/src/main/cpp/dependencies/jni-voithos/include/JavaEnum.h +++ b/webrtc-jni/src/main/cpp/dependencies/jni-voithos/include/JavaEnum.h @@ -53,6 +53,7 @@ namespace jni ~JavaEnum() { + values.release(); } JavaLocalRef toJava(JNIEnv * env, const T & nativeType) const diff --git a/webrtc-jni/src/main/cpp/dependencies/jni-voithos/include/JavaFactory.h b/webrtc-jni/src/main/cpp/dependencies/jni-voithos/include/JavaFactory.h index 639b4a65..c2d0747b 100644 --- a/webrtc-jni/src/main/cpp/dependencies/jni-voithos/include/JavaFactory.h +++ b/webrtc-jni/src/main/cpp/dependencies/jni-voithos/include/JavaFactory.h @@ -26,6 +26,7 @@ namespace jni virtual ~JavaFactory() { + javaClass.release(); } virtual JavaLocalRef create(JNIEnv * env, const T * nativeObject) const