Fix some Gtk::Menu memory leaks
authorRobin Gareus <robin@gareus.org>
Thu, 7 Mar 2019 16:02:12 +0000 (17:02 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 7 Mar 2019 22:50:50 +0000 (23:50 +0100)
commit7b96fa1c5e99e054f43ca3272d21ae955bfa3443
tree67f2e5efd9ce1890ad3a6444cb114341576d26d3
parent12a415f0772048f8a38a66a037b024223bc7bbc0
Fix some Gtk::Menu memory leaks

A Gtk::manage()d widget will be deleted when its parent container
is destroyed. Top-level context menus are not inside a container and
hence need to be manually deallocated.

The solution here is to use a shared Gtk::Menu pointer that is
centrally de/re-allocated.

This works because the GUI is single-threaded and at most one
context menu is visible at a time.
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui.h
gtk2_ardour/automation_controller.cc
gtk2_ardour/editor_summary.cc
gtk2_ardour/meter_strip.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/mixer_ui.cc
gtk2_ardour/session_dialog.cc
gtk2_ardour/visibility_group.cc
gtk2_ardour/visibility_group.h