From c1d7e7d5d961819255f6f2fe4de5ece3b80867db Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 19 Feb 2010 10:53:17 -0800 Subject: Added clear() method for debugging --- indra/llmessage/llcachename.cpp | 6 ++++++ indra/llmessage/llcachename.h | 1 + 2 files changed, 7 insertions(+) diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 9ca0347f83..eed2beb859 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -674,6 +674,12 @@ void LLCacheName::dumpStats() << llendl; } +void LLCacheName::clear() +{ + for_each(impl.mCache.begin(), impl.mCache.end(), DeletePairedPointer()); + impl.mCache.clear(); +} + //static std::string LLCacheName::getDefaultName() { diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h index 083975d4ca..6b6bbde6ab 100644 --- a/indra/llmessage/llcachename.h +++ b/indra/llmessage/llcachename.h @@ -115,6 +115,7 @@ public: // Debugging void dump(); // Dumps the contents of the cache void dumpStats(); // Dumps the sizes of the cache and associated queues. + void clear(); // Deletes all entries from the cache static std::string getDefaultName(); -- cgit v1.2.3