remove unused free memory JNI method