Added "&& oitr->second.first->referenceCount()<=1" check to removeExpiredObjectsInCache

so that it only expires objects in the cache that have no external reference.
This commit is contained in:
Robert Osfield 2004-01-02 17:06:18 +00:00
parent 9867bce5f0
commit bf9af3f940

View File

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