Commit f36aac6d authored by Yann Diorcet's avatar Yann Diorcet
Browse files

Fix lpconfig in java

parent 21c40caa
......@@ -23,6 +23,7 @@ package org.linphone.core;
class LpConfigImpl implements LpConfig {
private final long nativePtr;
boolean ownPtr = false;
public LpConfigImpl(long ptr) {
nativePtr=ptr;
......@@ -32,9 +33,12 @@ class LpConfigImpl implements LpConfig {
private native void delete(long ptr);
public LpConfigImpl(String file) {
nativePtr = newLpConfigImpl(file);
ownPtr = true;
}
protected void finalize() throws Throwable {
delete(nativePtr);
if(ownPtr) {
delete(nativePtr);
}
}
private native void setInt(long ptr, String section, String key, int value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment