diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-12-09 19:37:41 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:12:48 -0300 |
commit | a0fa4f1d94f86362e8adef0171c9f4dc966fa402 (patch) | |
tree | e2f95e0d1d8f19f53fa769005b0080da67f97b95 /libshiboken | |
parent | 97ea178de9327c8620943dd9101e45d18e6d185e (diff) |
Finally fix bug#500 - "If an instance of QPrintDialog is created a deadlock happens on shutdown."
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'libshiboken')
-rw-r--r-- | libshiboken/basewrapper.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp index b75a2300f..d9f5d3c07 100644 --- a/libshiboken/basewrapper.cpp +++ b/libshiboken/basewrapper.cpp @@ -30,6 +30,7 @@ #include <cstring> #include <cstddef> #include <algorithm> +#include "threadstatesaver.h" extern "C" { @@ -166,10 +167,11 @@ void SbkDeallocWrapper(PyObject* pyObj) Shiboken::DtorCallerVisitor visitor(sbkObj); Shiboken::walkThroughClassHierarchy(pyObj->ob_type, &visitor); } else { + Shiboken::ThreadStateSaver threadSaver; + threadSaver.save(); sbkType->d->cpp_dtor(sbkObj->d->cptr[0]); } } - Shiboken::Object::deallocData(sbkObj, !sbkObj->d->containsCppWrapper); } @@ -318,6 +320,8 @@ bool importModule(const char* moduleName, PyTypeObject*** cppApiPtr) void DtorCallerVisitor::visit(SbkObjectType* node) { + Shiboken::ThreadStateSaver threadSaver; + threadSaver.save(); node->d->cpp_dtor(m_pyObj->d->cptr[m_count]); m_count++; } |