summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-03-07 16:40:16 +0100
committerRobin Gareus <robin@gareus.org>2019-03-07 23:50:32 +0100
commit3bc9281c312ec237b6365c023c5ef060f5788a6b (patch)
tree12969680c5f11c2216bc3746f701c6906f8a2b21 /gtk2_ardour/editor.cc
parent204d7bf76ccccadea68a7bd3c8797b451a5c2971 (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/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 82ea4f027d..132a07a588 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -830,7 +830,6 @@ Editor::Editor ()
_ignore_region_action = false;
_last_region_menu_was_main = false;
- _popup_region_menu_item = 0;
_show_marker_lines = false;
@@ -858,6 +857,11 @@ Editor::Editor ()
Editor::~Editor()
{
+ delete tempo_marker_menu;
+ delete meter_marker_menu;
+ delete editor_ruler_menu;
+ delete _popup_region_menu_item;
+
delete button_bindings;
delete _routes;
delete _route_groups;