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:
parent
9867bce5f0
commit
bf9af3f940
@ -1813,7 +1813,8 @@ void Registry::removeExpiredObjectsInCache(double expiryTime)
|
||||
oitr!=_objectCache.end();
|
||||
++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
|
||||
// afterwards/
|
||||
|
Loading…
Reference in New Issue
Block a user