protecting c-pointer-handles from being freed twice.

This commit is contained in:
B. Petersen
2017-12-18 17:49:49 +01:00
parent cb30257b83
commit b69ca46485
5 changed files with 5 additions and 0 deletions
@@ -46,6 +46,7 @@ public class MrChat {
@Override protected void finalize() throws Throwable {
super.finalize();
MrChatUnref(m_hChat);
m_hChat = 0;
}
public native int getId();
@@ -36,6 +36,7 @@ public class MrChatlist {
@Override protected void finalize() throws Throwable {
super.finalize();
MrChatlistUnref(m_hChatlist);
m_hChatlist = 0;
}
public int getCnt() {
@@ -40,6 +40,7 @@ public class MrContact {
@Override protected void finalize() throws Throwable {
super.finalize();
MrContactUnref(m_hContact);
m_hContact = 0;
}
public native String getName();
@@ -41,6 +41,7 @@ public class MrLot {
@Override protected void finalize() throws Throwable {
super.finalize();
MrLotUnref(m_hLot);
m_hLot = 0;
}
public native String getText1();
@@ -64,6 +64,7 @@ public class MrMsg {
@Override protected void finalize() throws Throwable {
super.finalize();
MrMsgUnref(m_hMsg);
m_hMsg = 0;
}
public int getId() {