SF 1674179 enum variant leak. also affects 1112667 1465539 1569864

This commit is contained in:
clay_shooter
2007-03-10 16:04:39 +00:00
parent 3a2e9429f3
commit 165b6b7646
4 changed files with 26 additions and 4 deletions

View File

@@ -181,7 +181,9 @@ JNIEXPORT jobject JNICALL Java_com_jacob_com_Variant_toEnumVariant
return NULL;
}
// I am copying the pointer to java
if (ie) ie->AddRef();
// SF-1674179 fix EnumVariants memory leak
// AJ: yes, but the QueryInterface call above already incremented the reference
//if (ie) ie->AddRef();
jobject newAuto = env->NewObject(autoClass, autoCons, ie);
return newAuto;
}