summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2002-07-08 14:08:24 +0000
committerJames Henstridge <jamesh@src.gnome.org>2002-07-08 14:08:24 +0000
commit80ba97b5bdcea9aadcdee5a565bc83e646be0bb0 (patch)
treec55b8abcaf9aab9157d490d311971d169e62a1de
parentd863b294cbb26062b539ab6fea48422a96a4cfe1 (diff)
downloadpygobject-80ba97b5bdcea9aadcdee5a565bc83e646be0bb0.tar.gz
pygobject-80ba97b5bdcea9aadcdee5a565bc83e646be0bb0.tar.xz
pygobject-80ba97b5bdcea9aadcdee5a565bc83e646be0bb0.zip
apply another memory leak fix from Arjan (from bug #87413).
2002-07-08 James Henstridge <james@daa.com.au> * pygobject.c (pygobject_connect): apply another memory leak fix from Arjan (from bug #87413). (pygobject_connect_after): equivalent fix here. (pygobject_connect_object): and here. (pygobject_connect_object_after): and here.
-rw-r--r--gobject/pygobject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gobject/pygobject.c b/gobject/pygobject.c
index abcc010..29280d1 100644
--- a/gobject/pygobject.c
+++ b/gobject/pygobject.c
@@ -478,6 +478,7 @@ pygobject_connect(PyGObject *self, PyObject *args)
return NULL;
handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
pyg_closure_new(callback, extra_args, NULL), FALSE);
+ Py_DECREF(extra_args);
return PyInt_FromLong(handlerid);
}
@@ -516,6 +517,7 @@ pygobject_connect_after(PyGObject *self, PyObject *args)
return NULL;
handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
pyg_closure_new(callback, extra_args, NULL), TRUE);
+ Py_DECREF(extra_args);
return PyInt_FromLong(handlerid);
}
@@ -554,6 +556,7 @@ pygobject_connect_object(PyGObject *self, PyObject *args)
return NULL;
handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
pyg_closure_new(callback, extra_args, object), FALSE);
+ Py_DECREF(extra_args);
return PyInt_FromLong(handlerid);
}
@@ -592,6 +595,7 @@ pygobject_connect_object_after(PyGObject *self, PyObject *args)
return NULL;
handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
pyg_closure_new(callback, extra_args, object), TRUE);
+ Py_DECREF(extra_args);
return PyInt_FromLong(handlerid);
}