1
0
mirror of https://github.com/thp/pyotherside.git synced 2025-01-28 23:52:55 +08:00

Merge pull request #25 from fkrull/refleaks

Fix some reference leaks.
This commit is contained in:
Thomas Perl 2014-09-26 22:56:49 +02:00
commit dce73ae75f
2 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ class PyObjectListBuilder : public ListBuilder<PyObject *> {
virtual void append(PyObject *o) {
PyList_Append(list, o);
Py_DECREF(o);
}
virtual PyObject * value() {

View File

@ -161,6 +161,7 @@ QPython::importModule_sync(QString name)
}
PyDict_SetItemString(priv->globals, moduleName, module);
Py_CLEAR(module);
priv->leave();
return true;
}