GNOME Bugzilla – Bug 624249
GLib.List.remove() leaks references
Last modified: 2010-08-04 08:05:44 UTC
Created attachment 165798 [details] GLib.List.remove() reference leak test case Test case attached. GLib.List.prepend() adds a reference to the object I add to the list, but GLib.List.remove() doesn't do a corresponding unref.
When run, the Foobar instance never gets destroyed: [philip@philip-laptop Desktop]$ ./test ** Message: test.vala:7: Creating a Foobar: 0x9ef7000 [philip@philip-laptop Desktop]$
unfortunately, GList cannot be managed properly. You have basically two options: - use Gee (recommended) - do things the dirty way, and that means you need to know what you are doing I propose a patch to add some helpers, for discussion. It shouldn't hurt, so perhaps it could be added to glib-2.0 bindings.
Created attachment 166328 [details] [review] glib-2.0: add some helper for List remove
Anyone see a reason this shouldn't be marked as a duplicate of bug #586577?
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 586577 ***