summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mixer.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-24 04:04:01 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-24 04:04:01 +0000
commitf53cbaede885cd52b8fee59890e33575a4fc11fa (patch)
tree6db06514b75b029ece4d18fbc376e2e1cc06eb2e /gtk2_ardour/editor_mixer.cc
parentdefa1fad942e9a33b8fe3f56b26427af069a1b73 (diff)
clean up editor mixer strip when session is going away; slightly improved boost debugging
git-svn-id: svn://localhost/ardour2/branches/3.0@6397 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mixer.cc')
-rw-r--r--gtk2_ardour/editor_mixer.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc
index 56c5662690..311506ecdf 100644
--- a/gtk2_ardour/editor_mixer.cc
+++ b/gtk2_ardour/editor_mixer.cc
@@ -355,6 +355,20 @@ Editor::session_going_away ()
_routes->clear ();
_route_groups->clear ();
+ /* do this first so that deleting a track doesn't reset cms to null
+ and thus cause a leak.
+ */
+
+ if (current_mixer_strip) {
+ if (current_mixer_strip->get_parent() != 0) {
+ global_hpacker.remove (*current_mixer_strip);
+ }
+ delete current_mixer_strip;
+ current_mixer_strip = 0;
+ }
+
+ /* delete all trackviews */
+
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
delete *i;
}
@@ -376,14 +390,6 @@ Editor::session_going_away ()
/* get rid of any existing editor mixer strip */
- if (current_mixer_strip) {
- if (current_mixer_strip->get_parent() != 0) {
- global_hpacker.remove (*current_mixer_strip);
- }
- delete current_mixer_strip;
- current_mixer_strip = 0;
- }
-
WindowTitle title(Glib::get_application_name());
title += _("Editor");