I have a native method that does some work on a bitmap. Inside the method I grab the image data via a method call that writes the data to a jintArray
parameter that I've created with NewIntArray
:
jintArray pixels = env->NewIntArray(width * height);
I don't need to return this array back to the calling Java code - it's only for processing while in this method. Do I need to call ReleaseIntArrayElements
on pixels
? If so, what do I pass for the elems
parameter, since I don't need to copy it back to a Java array?
void (JNICALL *ReleaseIntArrayElements)
(JNIEnv *env, jintArray array, jint *elems, jint mode);