mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
lock source list when destroying it.
This commit is contained in:
parent
b3dd518b22
commit
ca8fa56b61
1 changed files with 9 additions and 6 deletions
|
|
@ -526,13 +526,16 @@ Session::destroy ()
|
|||
}
|
||||
routes.flush ();
|
||||
|
||||
DEBUG_TRACE (DEBUG::Destruction, "delete sources\n");
|
||||
for (SourceMap::iterator i = sources.begin(); i != sources.end(); ++i) {
|
||||
DEBUG_TRACE(DEBUG::Destruction, string_compose ("Dropping for source %1 ; pre-ref = %2\n", i->second->name(), i->second.use_count()));
|
||||
i->second->drop_references ();
|
||||
}
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::Destruction, "delete sources\n");
|
||||
Glib::Threads::Mutex::Lock lm (source_lock);
|
||||
for (SourceMap::iterator i = sources.begin(); i != sources.end(); ++i) {
|
||||
DEBUG_TRACE(DEBUG::Destruction, string_compose ("Dropping for source %1 ; pre-ref = %2\n", i->second->name(), i->second.use_count()));
|
||||
i->second->drop_references ();
|
||||
}
|
||||
|
||||
sources.clear ();
|
||||
sources.clear ();
|
||||
}
|
||||
|
||||
DEBUG_TRACE (DEBUG::Destruction, "delete route groups\n");
|
||||
for (list<RouteGroup *>::iterator i = _route_groups.begin(); i != _route_groups.end(); ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue