From b37b23af97fbffbf789222f03247439324648ffb Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 1 Mar 2011 21:54:54 +0000 Subject: improve, cleanup, rationalize Session::cleanup_sources() and supporting infrastructure git-svn-id: svn://localhost/ardour2/branches/3.0@9015 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/region_factory.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libs/ardour/region_factory.cc') diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc index 1fd81f9a4b..eba237d0d2 100644 --- a/libs/ardour/region_factory.cc +++ b/libs/ardour/region_factory.cc @@ -549,3 +549,15 @@ RegionFactory::get_regions_using_source (boost::shared_ptr s, std::set src) +{ + Glib::Mutex::Lock lm (region_map_lock); + + for (RegionMap::iterator i = region_map.begin(); i != region_map.end(); ++i) { + if (i->second->uses_source (src)) { + region_map.erase (i); + } + } +} -- cgit v1.2.3