drop route shared_ptr when Route::GoingAway is emitted
This commit is contained in:
parent
6827dfe832
commit
302d15d2c0
@ -58,6 +58,7 @@ class LIBARDOUR_API DiskIOProcessor : public Processor
|
||||
DiskIOProcessor (Session&, const std::string& name, Flag f);
|
||||
|
||||
void set_route (boost::shared_ptr<Route>);
|
||||
void drop_route ();
|
||||
|
||||
static void set_buffering_parameters (BufferingPreset bp);
|
||||
|
||||
|
@ -387,10 +387,20 @@ DiskIOProcessor::ChannelInfo::~ChannelInfo ()
|
||||
capture_transition_buf = 0;
|
||||
}
|
||||
|
||||
void
|
||||
DiskIOProcessor::drop_route ()
|
||||
{
|
||||
_route.reset ();
|
||||
}
|
||||
|
||||
void
|
||||
DiskIOProcessor::set_route (boost::shared_ptr<Route> r)
|
||||
{
|
||||
_route = r;
|
||||
|
||||
if (_route) {
|
||||
_route->DropReferences.connect_same_thread (*this, boost::bind (&DiskIOProcessor::drop_route, this));
|
||||
}
|
||||
}
|
||||
|
||||
/** Get the start, end, and length of a location "atomically".
|
||||
|
Loading…
Reference in New Issue
Block a user