I guess this question has been asked before, but I cannot find an
I am using "org.python.util.PythonInterpreter" to evaluate expressions.
I want to reuse the same instance of the interpreter object multiple times.
Before every evaluation (interpreter.exec(sourceCode);), I am doing the
org.python.core.PySystemState systemState = new
interpreter = new org.python.util.PythonInterpreter(null, systemState);
It works, but the problem with the above approach is that java garbage
collector kicks in too often to cleanup the memory that I am using every
time I call the interpreter.
I want to know a more efficient way to reset the system state (it is
necessary otherwise the variables from a previous execution may remain).
What do you guys recommend?
Get latest updates about Open Source Projects, Conferences and News.