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

This commit is contained in:
Richard Berger
2017-04-12 20:26:57 -04:00

View File

@ -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);
}