L
lionel pacoud
Hi,
I have a pb. I'm using JNI to speak from java to C.
I build in the C code a java array and I return it to the java
jshortArray array = (*env)->NewShortArray(env, compressedImgSize);
if(array) {
(*env)->SetShortArrayRegion(env, array, 0, compressedImgSize,
compressedImg);
}
where compressedImg is a buffer who contains the data that I want to
return.
the java array created (called here "array") will be free by the
garbage collector or I must free it.
(if I must free it, how could i do that. I don't found any things in
the spec.)
well, thanks for your answers.
Lionel
I have a pb. I'm using JNI to speak from java to C.
I build in the C code a java array and I return it to the java
jshortArray array = (*env)->NewShortArray(env, compressedImgSize);
if(array) {
(*env)->SetShortArrayRegion(env, array, 0, compressedImgSize,
compressedImg);
}
where compressedImg is a buffer who contains the data that I want to
return.
the java array created (called here "array") will be free by the
garbage collector or I must free it.
(if I must free it, how could i do that. I don't found any things in
the spec.)
well, thanks for your answers.
Lionel