- try to fix a memory leak
This commit is contained in:
parent
a413fb5c31
commit
9274f2b5e2
|
@ -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];
|
||||||
|
|
Loading…
Reference in New Issue