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:
theraven 2012-04-23 12:47:09 +00:00
parent f857c2928f
commit 121673c6d3
2 changed files with 57 additions and 0 deletions

View file

@ -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);
}
/**