mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
pkbind::finalize is corrected
This commit is contained in:
parent
cd53a746f4
commit
5d3fc8541f
@ -20,15 +20,19 @@ inline void initialize(int object_pool_size = 1024) {
|
||||
/// finalize the vm.
|
||||
inline void finalize(bool test = false) {
|
||||
if(!initialized) { return; }
|
||||
|
||||
object_pool::finalize();
|
||||
type::m_type_map.clear();
|
||||
capsule::tp_capsule.reset();
|
||||
cpp_function::tp_function_record.reset();
|
||||
|
||||
if(test) {
|
||||
py_resetvm();
|
||||
} else {
|
||||
py_finalize();
|
||||
}
|
||||
|
||||
initialized = false;
|
||||
}
|
||||
|
||||
/// a RAII class to initialize and finalize python interpreter
|
||||
|
Loading…
x
Reference in New Issue
Block a user