mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Fix a bug in the new autorelease pool implementation when pools are destroyed in the wrong order.
Test cast by Chris Armstrong! git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35105 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f857c2928f
commit
121673c6d3
2 changed files with 57 additions and 0 deletions
|
@ -400,6 +400,14 @@ pop_pool_from_cache (struct autorelease_thread_vars *tv)
|
|||
}
|
||||
- (void) emptyPool
|
||||
{
|
||||
struct autorelease_thread_vars *tv = ARP_THREAD_VARS;
|
||||
while (_child)
|
||||
{
|
||||
NSAutoreleasePool *pool = _child;
|
||||
_child = pool->_child;
|
||||
push_pool_to_cache(tv, pool);
|
||||
}
|
||||
tv->current_pool = self;
|
||||
objc_autoreleasePoolPop(_released);
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue