From 5a29ea627e8f756f0a4694a0483f518f30a3dd77 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 10 Sep 2014 15:06:34 +0200 Subject: [PATCH] fix java destruction of LinphoneCoreImpl --- java/impl/org/linphone/core/LinphoneCoreImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/impl/org/linphone/core/LinphoneCoreImpl.java b/java/impl/org/linphone/core/LinphoneCoreImpl.java index 1537aecf3..02725113a 100644 --- a/java/impl/org/linphone/core/LinphoneCoreImpl.java +++ b/java/impl/org/linphone/core/LinphoneCoreImpl.java @@ -168,7 +168,7 @@ class LinphoneCoreImpl implements LinphoneCore { } protected void finalize() throws Throwable { - + if (nativePtr!=0) destroy(); } private boolean contextInitialized() { @@ -267,6 +267,8 @@ class LinphoneCoreImpl implements LinphoneCore { return logs; } public synchronized void destroy() { + delete(nativePtr); + nativePtr=0; } private void isValid() {