Added code to the DatagbasePager::removeExpiredSubgraphs() that update

the osgDB::Registry cache.
This commit is contained in:
Robert Osfield
2004-01-06 14:09:12 +00:00
parent 9927c664b5
commit 3b82c67c13
2 changed files with 5 additions and 2 deletions

View File

@@ -537,6 +537,10 @@ void DatabasePager::removeExpiredSubgraphs(double currentFrameTime)
_childrenToDeleteListMutex.unlock();
}
// otherwise the childrenRemoved list will automatically unref() and deleting the nodes.
// update the Registry object cache.
osgDB::Registry::instance()->updateTimeStampOfObjectsInCacheWithExtenalReferences(currentFrameTime);
osgDB::Registry::instance()->removeExpiredObjectsInCache(expiryTime);
}

View File

@@ -1813,8 +1813,7 @@ void Registry::removeExpiredObjectsInCache(double expiryTime)
oitr!=_objectCache.end();
++oitr)
{
if (oitr->second.second<=expiryTime &&
oitr->second.first->referenceCount()<=1)
if (oitr->second.second<=expiryTime)
{
// record the filename of the entry to use as key for deleting
// afterwards/