mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
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
3 changed files with 9 additions and 0 deletions
|
|
@ -338,6 +338,11 @@ MonitorPort::clear_ports (bool instantly)
|
||||||
MonitorInputChanged (i->first, false); /* EMIT SIGNAL */
|
MonitorInputChanged (i->first, false); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (instantly) {
|
||||||
|
/* release shared_ptr references */
|
||||||
|
_monitor_ports.flush ();
|
||||||
|
}
|
||||||
|
|
||||||
if (!s) {
|
if (!s) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1158,6 +1158,9 @@ PortManager::update_input_ports (bool clear)
|
||||||
* do this when called from ::reestablish_ports()
|
* do this when called from ::reestablish_ports()
|
||||||
* "JACK: Cannot connect ports owned by inactive clients"
|
* "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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ Session::remove_bundle (std::shared_ptr<Bundle> bundle)
|
||||||
|
|
||||||
if (removed) {
|
if (removed) {
|
||||||
BundleAddedOrRemoved (); /* EMIT SIGNAL */
|
BundleAddedOrRemoved (); /* EMIT SIGNAL */
|
||||||
|
_bundles.flush ();
|
||||||
}
|
}
|
||||||
|
|
||||||
set_dirty();
|
set_dirty();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue