Commit e6f30ebc authored by Richard Berger's avatar Richard Berger
Browse files

Merge remote-tracking branch 'origin/master' into python_refactoring

parents 3fa9f0a2 cb867ea9
Loading
Loading
Loading
Loading
+3 −1
Changes for src/PYTHON/python_impl.cpp: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp)

PythonImpl::~PythonImpl()
{
  if(pyMain) {
    // clean up
    PyGILState_STATE gstate = PyGILState_Ensure();

@@ -83,12 +84,13 @@ PythonImpl::~PythonImpl()

    // shutdown Python interpreter

  if (pyMain && !external_interpreter) {
    if (!external_interpreter) {
      Py_Finalize();
    }
    else {
      PyGILState_Release(gstate);
    }
  }

  memory->sfree(pfuncs);
}