[ 1053870 ] jacob-msg 2019 - SafeArray + jni 1.4. Fixed a few problems with safe array manipulation that caused memory leaks. Also applied patch required to build against JMI newer than v1.2
This commit is contained in:
@@ -80,7 +80,12 @@ EventProxy::~EventProxy()
|
||||
pCP->Unadvise(dwEventCookie);
|
||||
JNIEnv *env;
|
||||
// attach to the current running thread
|
||||
jvm->AttachCurrentThread((void **)&env, jvm);
|
||||
#ifdef JNI_VERSION_1_2
|
||||
jvm->AttachCurrentThread((void **)&env, jvm);
|
||||
#else
|
||||
jvm->AttachCurrentThread((void**)&env, NULL);
|
||||
#endif
|
||||
|
||||
|
||||
env->DeleteGlobalRef(javaSinkObj);
|
||||
if (env->ExceptionOccurred()) { env->ExceptionDescribe(); }
|
||||
@@ -140,7 +145,11 @@ STDMETHODIMP EventProxy::Invoke(DISPID dispID, REFIID riid,
|
||||
if (DISPATCH_METHOD & wFlags)
|
||||
{
|
||||
// attach to the current running thread
|
||||
jvm->AttachCurrentThread((void**)&env, jvm);
|
||||
#ifdef JNI_VERSION_1_2
|
||||
jvm->AttachCurrentThread((void **)&env, jvm);
|
||||
#else
|
||||
jvm->AttachCurrentThread((void**)&env, NULL);
|
||||
#endif
|
||||
|
||||
|
||||
// get variant class
|
||||
|
||||
Reference in New Issue
Block a user