Added removeFromObjectCache method.

This commit is contained in:
Robert Osfield
2011-11-04 12:44:01 +00:00
parent 3c461dd706
commit 747654fb6d
2 changed files with 12 additions and 0 deletions

View File

@@ -1653,6 +1653,13 @@ void Registry::removeExpiredObjectsInCache(const osg::FrameStamp& frameStamp)
}
void Registry::removeFromObjectCache(const std::string& fileName)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_objectCacheMutex);
ObjectCache::iterator itr = _objectCache.find(fileName);
if (itr!=_objectCache.end()) _objectCache.erase(itr);
}
void Registry::clearObjectCache()
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_objectCacheMutex);