[Patch] memory leak in _wrap_pango_cairo_create_layout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyGTK |
Invalid
|
Medium
|
|||
pygtk (Debian) |
Fix Released
|
Unknown
|
|||
pygtk (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
if didn't unref after pygobject_new.
while(1):
a=
may cause, memory run out: python doesn't GC this memory.
The patch is:
Index: pygtk-2.
=======
--- pygtk-2.
+0800
+++ pygtk-2.
@@ -119,10 +119,15 @@
_wrap_
{
PangoLayout *ret;
+ PyObject *py_ret;
ret = pango_cairo_
/* pygobject_new handles NULL checking */
- return pygobject_
+ py_ret = pygobject_
+ if (ret) {
+ g_object_
+ }
+ return py_ret;
}
static PyObject *
Related branches
Changed in pygtk: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in pygtk (Debian): | |
status: | Unknown → Confirmed |
tags: | added: patch |
Changed in pygtk: | |
status: | New → Invalid |
Changed in pygtk (Debian): | |
status: | Confirmed → Fix Released |
Thank you for your bug report, setting to low though since gtk2 and pygtk are deprecated in favor of gtk3 and pygobject bindings