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

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -