mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 22:58:13 +00:00
Fix lpconfig in java
This commit is contained in:
parent
21c40caaa3
commit
f36aac6d38
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue