diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-29 16:10:31 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:38 -0400 |
commit | 0d5705d096a27cb561c4bbdd601315d3ee13811a (patch) | |
tree | 78748d4b4c0440c280145b8003cbd3649c771333 | |
parent | bfd0ba7bf38f31cc575403dd7ba86b9a2470de89 (diff) |
reorder destruction of VCAManager and Routes
-rw-r--r-- | libs/ardour/session.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 4ff42730ca..b9dbaa72fd 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -696,6 +696,11 @@ Session::destroy () DEBUG_TRACE (DEBUG::Destruction, "delete regions\n"); RegionFactory::delete_all_regions (); + /* Do this early so that VCAs no longer hold references to routes */ + + DEBUG_TRACE (DEBUG::Destruction, "delete vcas\n"); + delete _vca_manager; + DEBUG_TRACE (DEBUG::Destruction, "delete routes\n"); /* reset these three references to special routes before we do the usual route delete thing */ @@ -748,7 +753,6 @@ Session::destroy () delete midi_clock; delete _tempo_map; - delete _vca_manager; /* clear event queue, the session is gone, nobody is interested in * those anymore, but they do leak memory if not removed |