gst/arg-types.py: Fix memory leak for GstMiniObjects used as parameters in class method overrides.

Original commit message from CVS:
Patch by : Vincent Genieux <mutex at runbox dot com>
* gst/arg-types.py:
Fix memory leak for GstMiniObjects used as parameters in class method
overrides.
Fixes #543961
This commit is contained in:
Vincent Genieux 2008-12-09 10:16:08 +00:00 committed by Edward Hervey
parent 75bd1f6f6d
commit e6cd027e1a
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2008-12-09 Edward Hervey <edward.hervey@collabora.co.uk>
Patch by : Vincent Genieux <mutex at runbox dot com>
* gst/arg-types.py:
Fix memory leak for GstMiniObjects used as parameters in class method
overrides.
Fixes #543961
2008-12-06 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/gstpad.override:

View file

@ -160,7 +160,7 @@ class GstMiniObjectParam(Parameter):
" py_%s = Py_None;\n"
"}"
% (self.name, self.name, self.name, self.name, self.name)),
cleanup=("gst_mini_object_ref ((GstMiniObject *) %s);\nPy_DECREF(py_%s);" % (self.name, self.name)))
cleanup=("Py_DECREF(py_%s);" % self.name))
self.wrapper.add_pyargv_item("py_%s" % self.name)
matcher.register_reverse('GstMiniObject*', GstMiniObjectParam)