After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710754 - GtkModelMenu: don't leak submenus
GtkModelMenu: don't leak submenus
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-10-23 20:50 UTC by Lars Karlitski
Modified: 2013-10-25 14:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkModelMenu: don't leak submenus (1.00 KB, patch)
2013-10-23 20:50 UTC, Lars Karlitski
committed Details | Review

Description Lars Karlitski 2013-10-23 20:50:26 UTC
This is against gtk+ 3.8.3, before GtkMenuTracker was introduced (which already
fixed this issue).

See patch for a detailed description.
Comment 1 Lars Karlitski 2013-10-23 20:50:28 UTC
Created attachment 257969 [details] [review]
GtkModelMenu: don't leak submenus

gtk_container_remove_child() is not enough to break the reference cycle
between the removed menu item and the submenu that is attached to it.
Use gtk_widget_destroy() instead.
Comment 2 Matthias Clasen 2013-10-24 18:39:19 UTC
Review of attachment 257969 [details] [review]:

ok
Comment 3 Lars Karlitski 2013-10-25 14:15:15 UTC
Attachment 257969 [details] pushed as 37675d8 - GtkModelMenu: don't leak submenus