summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_time_axis.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/route_time_axis.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/route_time_axis.cc')
-rw-r--r--gtk2_ardour/route_time_axis.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 7614093e02..4092263dda 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -109,8 +109,6 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, ArdourCan
, plugins_submenu_item (0)
, route_group_menu (0)
, playlist_action_menu (0)
- , mode_menu (0)
- , color_mode_menu (0)
, gm (sess, true, 75, 14)
, _ignore_set_layer_display (false)
, pan_automation_item(NULL)
@@ -339,7 +337,7 @@ RouteTimeAxisView::~RouteTimeAxisView ()
}
delete playlist_action_menu;
- playlist_action_menu = 0;
+ delete automation_action_menu;
delete _view;
_view = 0;
@@ -788,6 +786,7 @@ RouteTimeAxisView::build_display_menu ()
} else {
/* show nothing */
+ delete alignment_menu;
}
items.push_back (SeparatorElem());