Package jep.python
Class MemoryManager
java.lang.Object
jep.JepAccess
jep.python.MemoryManager
Manages the native memory associated with PyObjects in an Interpreter.
- Since:
- 3.8
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCleans out weak references to PyPointers associated with this Interpreter.voidcloseInterpreter(Jep jep) Stop managing memory for an interpreter.voidopenInterpreter(Jep jep)
-
Constructor Details
-
MemoryManager
public MemoryManager()
-
-
Method Details
-
openInterpreter
-
closeInterpreter
Stop managing memory for an interpreter. Any PyPointers managed by this object will no longer be usable from the interpreter thread. If this is the last interpreter used by this manager then all PyPointers managed by this will be disposed.- Throws:
JepException- if an error occurs
-
cleanupWeakReferences
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
-