diff options
author | James Cook <james@lindenlab.com> | 2010-02-19 10:53:17 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-02-19 10:53:17 -0800 |
commit | c1d7e7d5d961819255f6f2fe4de5ece3b80867db (patch) | |
tree | ae5e5fcb4c9feae98825f4be679231ddada9050a /indra | |
parent | b77cd684fb5a46bb613df1a73af1856cf39aef84 (diff) |
Added clear() method for debugging
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmessage/llcachename.cpp | 6 | ||||
-rw-r--r-- | indra/llmessage/llcachename.h | 1 |
2 files changed, 7 insertions, 0 deletions
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(); |