We have some old code that I am taking over and we have this.
JNIEXPORT jint JNICALL
Java_com_ibm_jusb_os_windows_JavaxUsb_submitControlPipeRequest
(JNIEnv *env, ..., jbyteArray buffer, ... )
{
...
output = (*env)->GetByteArrayElements(env, jbOutBuffer, 0);//Get the
pointer to jbyteArray
...
}
Is it necessary to call
if(output) (*env)->ReleaseByteArrayElements(env, jbOutBuffer, output, 0);
Gordon Beaton - 19 Apr 2006 19:45 GMT
> output = (*env)->GetByteArrayElements(env, jbOutBuffer, 0);
[...]
> Is it necessary to call
> if(output) (*env)->ReleaseByteArrayElements(env, jbOutBuffer, output, 0);
Yes.
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e