Added clear() method for debugging

meow-7.2.2
James Cook 2010-02-19 10:53:17 -08:00
parent b77cd684fb
commit c1d7e7d5d9
2 changed files with 7 additions and 0 deletions

View File

@ -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()
{

View File

@ -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();