Package jep.python
Class MemoryManager
- java.lang.Object
-
- jep.python.MemoryManager
-
public final class MemoryManager extends java.lang.Object
Manages the native memory associated with PyObjects in an Interpreter.- Since:
- 3.8
- See Also:
- How to Handle Java Finalization's Memory-Retention Issues
-
-
Constructor Summary
Constructors Constructor Description MemoryManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanupReferences()
Cleans out all the known references to PyPointers associated with this Interpreter.void
cleanupWeakReferences()
Cleans out weak references to PyPointers associated with this Interpreter.
-
-
-
Method Detail
-
cleanupReferences
public void cleanupReferences() throws JepException
Cleans out all the known references to PyPointers associated with this Interpreter.- Throws:
JepException
- if an error occurs
-
cleanupWeakReferences
public void cleanupWeakReferences() throws JepException
Cleans out weak references to PyPointers associated with this Interpreter. Attempts to free memory earlier than a Jep.close() if the developer did not explicitly free the memory with PyObject.close().- Throws:
JepException
- if an error occurs
-
-