GPtrArray API is prone to leak
Bug #718178 reported by
Michal Hruby
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libzeitgeist |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Now that there's GObject-
As an example, doing:
GPtrArray templates = g_ptr_array_
g_ptr_array_add (g_object_ref_sink (some_event));
zeitgeist_
g_ptr_array_unref (templates);
Will result in mem leak, because the find_events call will change the free_func on the templates.
Changed in libzeitgeist: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
To post a comment you must log in.
I agree. The current API was developed maybe with a little to much
focus on a convenient C API. Fixing this will be an API break
nonetheless, so we can target this for the 0.4 series - at which point
we should probably also switch the VAPI to use GenericArray instead of
pointer array.