Added C++ specific path for calling std::map<>::erase() to avoid issues with std::map<>::erase implementation that invalidates iterators
This commit is contained in:
parent
863dee52e2
commit
d572d78214
@ -144,7 +144,11 @@ void ObjectCache::removeExpiredObjectsInCache(double expiryTime)
|
|||||||
{
|
{
|
||||||
if (oitr->second.second<=expiryTime)
|
if (oitr->second.second<=expiryTime)
|
||||||
{
|
{
|
||||||
|
#if __cplusplus > 199711L
|
||||||
|
oitr = _objectCache.erase(oitr);
|
||||||
|
#else
|
||||||
_objectCache.erase(oitr++);
|
_objectCache.erase(oitr++);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user