jni table overflow even after deleteLocalRef
When I run the code, I get an error "failed adding to JNI local ref table has 512 entries" This is my code: jstring pJNIData = pJNIEnv->NewStringUTF ( variables[0].GetStringValue() ); pJNIEnv->CallStaticVoidMethod ( pJNIActivityClass, pJNIMethodIDStartTime, pJNIData ) ; pJNIEnv->DeleteLocalRef(pJNIData); I have read several suggestions, but none of them work! In spite of the DeleteLocalRef , it fails to works. The function is used in a profiler that literally calls all the functions... I have seen this when a JNI method called Java code (in my case, the method was not static). As I understand,