mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
move deallocation of zombie map outside lock protected section so that any exception while deallocating will not cause unbalanced lock/unlock
This commit is contained in:
parent
684e952b04
commit
291ad8384e
1 changed files with 4 additions and 1 deletions
|
@ -1121,9 +1121,12 @@ static id gs_weak_load(id obj)
|
|||
|
||||
+ (void) _atExit
|
||||
{
|
||||
NSMapTable *m = nil;
|
||||
pthread_mutex_lock(&allocationLock);
|
||||
DESTROY(zombieMap);
|
||||
m = zombieMap;
|
||||
zombieMap = nil;
|
||||
pthread_mutex_unlock(&allocationLock);
|
||||
DESTROY(m);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue