Skip to content

Commit

Permalink
ObjectsRegistry: added Clear() method
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Oct 15, 2024
1 parent bdf1f7c commit 55500db
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Common/interface/ObjectsRegistry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ class ObjectsRegistry
}
}

/// Removes all objects from the cache.
void Clear()
{
std::lock_guard<std::mutex> Guard{m_CacheMtx};
m_Cache.clear();
m_NumRequestsSinceLastPurge.store(0);
}

private:
class ObjectWrapper
{
Expand Down

0 comments on commit 55500db

Please sign in to comment.