I m using:-
const char *value = pEnv->GetStringUTFChars(str2, 0);
Should I try passing a jboolean as second parameter something like:
jboolean isCopy;
*value = (pEnv)->GetStringUTFChars(theString,&isCopy);
and releasing on the basis of isCopy...
What do u think ?
**************
jstring utf_str =
(jstring) env->GetObjectArrayElement(objArray, i);
const char* c = env->GetStringUTFChars(utf_str, &isCopy);
fprintf(stdout, "\t objArray[%d] = (%s)\n", i, c);
if (isCopy == JNI_TRUE) {
env->ReleaseStringUTFChars(utf_str, c);
}
env->DeleteLocalRef(utf_str);
*****************
Should I change code to look like this ?
1. Using isCopy .
2. Using DeleteLocalRef.
?
[ May 15, 2006: Message edited by: Andy Smith ]