Jni object growing memory in java loop -
When creating a JNI object in the Java loop, the memory continues to grow in Java.
Example:
class net {original zero hello (); Public static zero main (string [] args) {while (true) {// jni object play net = new net (); // This loop is mounting in memory}} Static {System.loadLibrary ('Hello')}} JNIEXPORT void JNICALL Java_Nat_hello (JNIEnv *, jobject) {// nothing code ........... ... .........}
pass loop one The new net object that requires memory since the loop is always running and there is no break-in situation, so the memory actually increases rapidly.
Comments
Post a Comment