Skip to content

Commit 50c3306

Browse files
committed
added missing GIL scope
1 parent 170d4a4 commit 50c3306

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/PythonQtSignalReceiver.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ PythonQtSignalReceiver::PythonQtSignalReceiver(QObject* obj):PythonQtSignalRecei
178178

179179
PythonQtSignalReceiver::~PythonQtSignalReceiver()
180180
{
181+
// we need the GIL scope here, because the targets keep references to Python objects
182+
PYTHONQT_GIL_SCOPE;
181183
PythonQt::priv()->removeSignalEmitter(_obj);
184+
_targets.clear();
182185
}
183186

184187

0 commit comments

Comments
 (0)