diff options
author | Robin Gareus <robin@gareus.org> | 2019-03-07 16:40:16 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-03-07 23:50:32 +0100 |
commit | 3bc9281c312ec237b6365c023c5ef060f5788a6b (patch) | |
tree | 12969680c5f11c2216bc3746f701c6906f8a2b21 /gtk2_ardour/route_time_axis.h | |
parent | 204d7bf76ccccadea68a7bd3c8797b451a5c2971 (diff) |
Fix some Gtk::Menu related 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.
This adds explicit delete calls for menus where there is a
member variable reference to the Menu.
Diffstat (limited to 'gtk2_ardour/route_time_axis.h')
-rw-r--r-- | gtk2_ardour/route_time_axis.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h index 48af0f82b2..1b061d0fc7 100644 --- a/gtk2_ardour/route_time_axis.h +++ b/gtk2_ardour/route_time_axis.h @@ -161,9 +161,9 @@ protected: struct ProcessorAutomationInfo { boost::shared_ptr<ARDOUR::Processor> processor; - bool valid; - Gtk::Menu* menu; - std::vector<ProcessorAutomationNode*> lines; + bool valid; + Gtk::Menu* menu; + std::vector<ProcessorAutomationNode*> lines; ProcessorAutomationInfo (boost::shared_ptr<ARDOUR::Processor> i) : processor (i), valid (true), menu (0) {} @@ -255,10 +255,6 @@ protected: RouteGroupMenu* route_group_menu; Gtk::Menu* playlist_action_menu; Gtk::MenuItem* playlist_item; - Gtk::Menu* mode_menu; - Gtk::Menu* color_mode_menu; - - virtual Gtk::Menu* build_color_mode_menu() { return 0; } void use_playlist (Gtk::RadioMenuItem *item, boost::weak_ptr<ARDOUR::Playlist> wpl); |