diff options
Diffstat (limited to 'src/native/addrbook/msoutlook/MsOutlookMAPIHResultException.cxx')
-rw-r--r-- | src/native/addrbook/msoutlook/MsOutlookMAPIHResultException.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/native/addrbook/msoutlook/MsOutlookMAPIHResultException.cxx b/src/native/addrbook/msoutlook/MsOutlookMAPIHResultException.cxx index 9bb591c..706a5de 100644 --- a/src/native/addrbook/msoutlook/MsOutlookMAPIHResultException.cxx +++ b/src/native/addrbook/msoutlook/MsOutlookMAPIHResultException.cxx @@ -81,7 +81,12 @@ MsOutlookMAPIHResultException_throwNew (jlong) hResult, jmessage);
if (t)
+ {
jniEnv->Throw((jthrowable) t);
+
+ jniEnv->DeleteLocalRef(t);
+ }
+ jniEnv->DeleteLocalRef(jmessage);
}
return;
}
@@ -95,11 +100,17 @@ MsOutlookMAPIHResultException_throwNew jobject t = jniEnv->NewObject(clazz, methodID, hResult);
if (t)
+ {
jniEnv->Throw((jthrowable) t);
+
+ jniEnv->DeleteLocalRef(t);
+ }
return;
}
}
jniEnv->ThrowNew(clazz, message);
+
+ jniEnv->DeleteLocalRef(clazz);
}
}
|