mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 13:23:59 +02:00
- try to fix a memory leak
This commit is contained in:
@@ -51,7 +51,9 @@ protected:
|
|||||||
static Mutex mutexMap(CODE_AT_LINE);
|
static Mutex mutexMap(CODE_AT_LINE);
|
||||||
if(itemCacheMutexList.find(cacheKey) == itemCacheMutexList.end()) {
|
if(itemCacheMutexList.find(cacheKey) == itemCacheMutexList.end()) {
|
||||||
MutexSafeWrapper safeMutex(&mutexMap);
|
MutexSafeWrapper safeMutex(&mutexMap);
|
||||||
itemCacheMutexList[cacheKey] = new Mutex(CODE_AT_LINE);
|
if(itemCacheMutexList.find(cacheKey) == itemCacheMutexList.end()) {
|
||||||
|
itemCacheMutexList[cacheKey] = new Mutex(CODE_AT_LINE);
|
||||||
|
}
|
||||||
safeMutex.ReleaseLock();
|
safeMutex.ReleaseLock();
|
||||||
}
|
}
|
||||||
Mutex *mutex = itemCacheMutexList[cacheKey];
|
Mutex *mutex = itemCacheMutexList[cacheKey];
|
||||||
|
Reference in New Issue
Block a user