release shared route pointer kept by InternalSend when dropping refs.

fixes "SessionHandleRef exists across session deletion"
when using AuxSends
This commit is contained in:
Robin Gareus
2014-09-03 05:17:16 +02:00
parent f684cc24ec
commit 07a651d2ec
2 changed files with 9 additions and 0 deletions

View File

@@ -65,8 +65,10 @@ class LIBARDOUR_API InternalSend : public Send
boost::shared_ptr<Route> _send_to;
PBD::ID _send_to_id;
PBD::ScopedConnection connect_c;
PBD::ScopedConnection source_connection;
PBD::ScopedConnectionList target_connections;
void send_from_going_away ();
void send_to_going_away ();
void send_to_property_changed (const PBD::PropertyChange&);
int connect_when_legal ();

View File

@@ -58,6 +58,7 @@ InternalSend::InternalSend (Session& s,
init_gain ();
_send_from->DropReferences.connect_same_thread (source_connection, boost::bind (&InternalSend::send_from_going_away, this));
CycleStart.connect_same_thread (*this, boost::bind (&InternalSend::cycle_start, this, _1));
}
@@ -117,6 +118,12 @@ InternalSend::target_io_changed ()
reset_panner();
}
void
InternalSend::send_from_going_away ()
{
_send_from.reset();
}
void
InternalSend::send_to_going_away ()
{