From 80ba97b5bdcea9aadcdee5a565bc83e646be0bb0 Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Mon, 8 Jul 2002 14:08:24 +0000 Subject: apply another memory leak fix from Arjan (from bug #87413). 2002-07-08 James Henstridge * 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. --- gobject/pygobject.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gobject/pygobject.c b/gobject/pygobject.c index abcc0100..29280d15 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); } -- cgit v1.2.1