Added code to the DatagbasePager::removeExpiredSubgraphs() that update
the osgDB::Registry cache.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user