Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
JNIEXPORT void JNICALL Java_SomeClass_someMethod(JNIEnv* env, jobject obj, jintArray array) {
jsize size = (*env)->GetArrayLength(env, array);
jint* buffer = (*env)->GetIntArrayElements(env, array, NULL);
...
(*env)->ReleaseIntArrayElements(env, array, buffer, 0);
}
JNI_ABORT
worth passing if data from the array was needed, but the original array itself does not need to be changed. If changes to the array need to be saved, then JNI_ABORT
0 must be passed instead.
Serialize the data into something language independent, like json, or some universal binary format
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question