summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-11-30 23:15:49 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-11-30 23:15:49 +0000
commit2542b776c5128bee46528b4b6d6b342772594953 (patch)
tree9114fdf5f94c7cb6309afc84b4b793ab4ce7f46f /gtk2_ardour/route_ui.cc
parent54a96bb67521e3fc633babe6d9aea86113eb2c74 (diff)
clarify ownership and management of RouteUI::remote_control_menu
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4273 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r--gtk2_ardour/route_ui.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index efec686ed5..cc4f541385 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -114,11 +114,6 @@ RouteUI::reset ()
mute_menu = 0;
}
- if (remote_control_menu) {
- delete remote_control_menu;
- remote_control_menu = 0;
- }
-
if (xml_node) {
/* do not delete the node - its owned by the route */
xml_node = 0;
@@ -193,6 +188,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
RouteUI::~RouteUI()
{
GoingAway (); /* EMIT SIGNAL */
+
if (solo_menu) {
delete solo_menu;
}
@@ -200,10 +196,13 @@ RouteUI::~RouteUI()
if (mute_menu) {
delete mute_menu;
}
-
- if (remote_control_menu) {
- delete remote_control_menu;
- }
+
+ /* Note: the remote control menu is constructed
+ by derived classes (e.g. MixerStrip or RouteTimeAxis) and
+ is always attached to a context menu. It then becomes
+ owned by that menu, and will deleted along with it. We
+ do not need to take care of it here.
+ */
}
bool
@@ -941,7 +940,7 @@ gint
RouteUI::idle_remove_this_route (RouteUI *rui)
{
rui->_session.remove_route (rui->_route);
- return FALSE;
+ return false;
}
void