Sample code:
jclass arrayListClass = env->FindClass("java/util/ArrayList");
....
env->DeleteLocalRef(arrayListClass);
Is it necessary to call DeleteLocalRef ? In fact, it is unnecessary to call DeleteLocalRef in most of the cases. However, JNI has a limited (but configurable) number of local references available. So, the best practice is to delete if the reference is created in a loop
No comments:
Post a Comment