We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02c3ee9 commit 2feb87eCopy full SHA for 2feb87e
1 file changed
Plugin/src/SofaPython3/PythonEnvironment.cpp
@@ -324,7 +324,10 @@ void PythonEnvironment::Release()
324
{
325
/// Finish the Python Interpreter
326
/// obviously can't use raii here
327
- if( Py_IsInitialized() ) {
+ static bool isReleased = false;
328
+ if( Py_IsInitialized() && !isReleased) {
329
+ isReleased = true;
330
+
331
PyGILState_Ensure();
332
py::finalize_interpreter();
333
getStaticData()->reset();
0 commit comments