diff --git a/db/javajs.cpp b/db/javajs.cpp index d318cb7b89b..97f438dc540 100644 --- a/db/javajs.cpp +++ b/db/javajs.cpp @@ -578,6 +578,7 @@ JNIEXPORT void JNICALL java_native_say(JNIEnv * env , jclass, jobject outBuffer Message in; jniCallback( out , in ); + assert( ! out.freeIt ); } JNIEXPORT jint JNICALL java_native_call(JNIEnv * env , jclass, jobject outBuffer , jobject inBuffer ) { @@ -593,6 +594,9 @@ JNIEXPORT jint JNICALL java_native_call(JNIEnv * env , jclass, jobject outBuffer JNI_DEBUG( "copying data of len :" << in.data->len ); assert( env->GetDirectBufferCapacity( inBuffer ) >= in.data->len ); memcpy( env->GetDirectBufferAddress( inBuffer ) , in.data , in.data->len ); + + assert( ! out.freeIt ); + assert( in.freeIt ); return in.data->len; }