diff options
author | Robin Gareus <robin@gareus.org> | 2019-03-23 15:52:36 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-03-23 16:15:28 +0100 |
commit | 96e991d08f94a7da04a9bb6fe2eb55968013759d (patch) | |
tree | 70c1a0c65f703595ad28d23c45c13aae5c518b38 /libs/ardour/session.cc | |
parent | da114c5a4db20cf91c8092284f290e8b90d078b0 (diff) |
Clean out session-global controllables
This isn't strictly speaking needed, there are only a handful of
users (most notably generic-midi ctrl surface, and Selection)
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 2c00fbbd80..d6753c50d9 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -680,6 +680,14 @@ Session::destroy () Port::PortDrop (); /* EMIT SIGNAL */ + { + Glib::Threads::Mutex::Lock lm (controllables_lock); + for (Controllables::iterator i = controllables.begin(); i != controllables.end(); ++i) { + (*i)->DropReferences (); /* EMIT SIGNAL */ + } + controllables.clear (); + } + /* clear history so that no references to objects are held any more */ _history.clear (); @@ -864,6 +872,10 @@ Session::destroy () DEBUG_TRACE (DEBUG::Destruction, "Session::destroy() done\n"); +#ifndef NDEBUG + Controllable::dump_registry (); +#endif + BOOST_SHOW_POINTERS (); } |