- fixed a bunch of memory leaks that will hopefully mean less overall memory requirements.

This commit is contained in:
Mark Vejvoda
2011-09-28 06:57:42 +00:00
parent 59246056bc
commit aed293bba2
11 changed files with 161 additions and 33 deletions

View File

@@ -93,7 +93,7 @@ protected:
public:
CacheManager() { }
~CacheManager() {
static void cleanupMutexes() {
for(std::map<string, Mutex *>::iterator iterMap = itemCacheMutexList.begin();
iterMap != itemCacheMutexList.end(); iterMap++) {
delete iterMap->second;
@@ -101,6 +101,9 @@ public:
}
itemCacheMutexList.clear();
}
~CacheManager() {
CacheManager::cleanupMutexes();
}
template <typename T>
static void setCachedItem(string cacheKey, const T value) {