Merge lp:~mterry/libdbusmenu/unref-gtkmenuitems into lp:libdbusmenu/0.5
Status: | Merged |
---|---|
Approved by: | Ted Gould |
Approved revision: | 341 |
Merged at revision: | 342 |
Proposed branch: | lp:~mterry/libdbusmenu/unref-gtkmenuitems |
Merge into: | lp:libdbusmenu/0.5 |
Diff against target: |
40 lines (+14/-6) 1 file modified
libdbusmenu-gtk/client.c (+14/-6) |
To merge this branch: | bzr merge lp:~mterry/libdbusmenu/unref-gtkmenuitems |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
Review via email: mp+78156@code.launchpad.net |
Description of the change
Another result of my investigations into bug 835646. I don't think this is the last leak, but it should help a bit.
GtkMenuItems weren't necessarily being finalized, because we would still hold a reference to them.
dbusmenu_
When the corresponding DbusmenuMenuitem would die, we used to just be calling gtk_widget_destroy, which removes the item from any containers and does some other cleanups. Being unparented would reduce the ref count to 1, where it would remain.
So I've added another g_object_unref call to match our initial ref_sink. And some comments to explain why.