Clear current thread state before destroying the thread state object.

This commit is contained in:
Gunnar Beutner 2013-02-14 16:02:43 +01:00
parent 413f81c29d
commit 4a89f69990
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,8 @@ PythonInterpreter::~PythonInterpreter(void)
{
PyEval_AcquireLock();
(void) PyThreadState_Swap(NULL);
PyThreadState_Clear(m_ThreadState);
PyThreadState_Delete(m_ThreadState);