From 8b380a423a4aecfeccb5a26fa418937810b81cef Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 3 Aug 2017 18:52:39 +0200 Subject: improve 1a288ddd, destroy IO after disconnecting from signals. This does not completely fix the race-condition. The GUI (e.g. connection-manager) may still hold a shared-ptr reference. --- libs/ardour/session.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 62514f6d36..91f67cf3da 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -644,19 +644,19 @@ Session::destroy () _slave = 0; } - /* remove I/O objects before unsetting the engine session */ - _click_io.reset (); - _ltc_input.reset (); - _ltc_output.reset (); - /* disconnect from any and all signals that we are connected to */ Port::PortSignalDrop (); /* EMIT SIGNAL */ drop_connections (); /* shutdown control surface protocols while we still have ports - and the engine to move data to any devices. - */ + * and the engine to move data to any devices. + */ + + /* remove I/O objects before unsetting the engine session */ + _click_io.reset (); + _ltc_input.reset (); + _ltc_output.reset (); ControlProtocolManager::instance().drop_protocols (); -- cgit v1.2.3