Drop some shared pointer references after RCU writes
When removing instances from some RCU managed list or vector,
they can still live on as shared_ptr references on the
RCU's dead wood stack.
In many cases this is not an issue, in these cases it's prudent.
see also 44610c7877
This commit is contained in:
parent
4d1d938263
commit
908a402a75
@ -338,6 +338,11 @@ MonitorPort::clear_ports (bool instantly)
|
||||
MonitorInputChanged (i->first, false); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
if (instantly) {
|
||||
/* release shared_ptr references */
|
||||
_monitor_ports.flush ();
|
||||
}
|
||||
|
||||
if (!s) {
|
||||
return;
|
||||
}
|
||||
|
@ -1158,6 +1158,9 @@ PortManager::update_input_ports (bool clear)
|
||||
* do this when called from ::reestablish_ports()
|
||||
* "JACK: Cannot connect ports owned by inactive clients"
|
||||
*/
|
||||
/* .. but take the opportunity to clear out dead wood */
|
||||
_audio_input_ports.flush ();
|
||||
_midi_input_ports.flush ();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,7 @@ Session::remove_bundle (std::shared_ptr<Bundle> bundle)
|
||||
|
||||
if (removed) {
|
||||
BundleAddedOrRemoved (); /* EMIT SIGNAL */
|
||||
_bundles.flush ();
|
||||
}
|
||||
|
||||
set_dirty();
|
||||
|
Loading…
Reference in New Issue
Block a user