GNOME Bugzilla – Bug 596739
Python bindings leak memory
Last modified: 2009-10-05 15:47:10 UTC
The python bindings leak at least the return value of vte_terminal_get_text and similar functions. The return value of these is owned by the caller, but in the overriden functions (and the def file, not that that matters) they are not correctly freed. A gchar* passed to Py_BuildValue needs to be freed by the binding, as python just creates a copy itself.
Created attachment 144269 [details] [review] patch that should fix some leaks Warning: I have not even tried to compile this!
Hi Benjamin, I don't know much about the python bindings. If you can review it yourself again for obvious omissions, etc, feel free to commit. Thanks
OK, I have looked more closely, found more leaks and fixed those too (attribute list). I think the patch is good, and I have pushed it to master. commit fa3508f4957a8cfb6f6f22ef904d5c89f9d54f4a Author: Benjamin Berg <benjamin@sipsolutions.net> Date: Mon Oct 5 17:41:49 2009 +0200 Fix memory leaks in python bindings (bug #596739). http://git.gnome.org/cgit/vte/commit/?id=fa3508f4957a8cfb6f6f22ef904d5c89f9d54f4a