Message8960
You can duplicate the case by run the following code and monitor the memory:-
public static void main(String[] args) {
try {
Thread.sleep(10 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
PySystemState pySystemState = null;
PythonInterpreter interp = null;
for (int i = 1; i <= 100000; i++) {
pySystemState = new PySystemState();
interp = new PythonInterpreter(null, pySystemState);
interp.cleanup();
pySystemState.cleanup();
System.out.println("PythonInterpreter number [" + i + "] has been created and cleanup.");
}
System.gc();
// Please take Heap dump and check the number of objects for type "org.python.core.PySystemState$PySystemStateCloser$ShutdownCloser"
try {
Thread.sleep(5 * 60 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
} |
|
Date |
User |
Action |
Args |
2014-09-07 12:49:46 | Adel | set | messageid: <1410094186.41.0.307888649429.issue2199@psf.upfronthosting.co.za> |
2014-09-07 12:49:46 | Adel | set | recipients:
+ Adel |
2014-09-07 12:49:46 | Adel | link | issue2199 messages |
2014-09-07 12:49:45 | Adel | create | |
|