Skip to content

Commit 55500db

Browse files
ObjectsRegistry: added Clear() method
1 parent bdf1f7c commit 55500db

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Common/interface/ObjectsRegistry.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,14 @@ class ObjectsRegistry
264264
}
265265
}
266266

267+
/// Removes all objects from the cache.
268+
void Clear()
269+
{
270+
std::lock_guard<std::mutex> Guard{m_CacheMtx};
271+
m_Cache.clear();
272+
m_NumRequestsSinceLastPurge.store(0);
273+
}
274+
267275
private:
268276
class ObjectWrapper
269277
{

0 commit comments

Comments
 (0)