fix java destruction of LinphoneCoreImpl

This commit is contained in:
Simon Morlat 2014-09-10 15:06:34 +02:00
parent 8ca0fac233
commit 5a29ea627e

View file

@ -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() {