mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Fix unnecessary extra pool creation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22339 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3c2b3f6699
commit
767ed212c6
2 changed files with 8 additions and 2 deletions
|
@ -231,11 +231,12 @@ static IMP initImp;
|
|||
NSThread *t = GSCurrentThread();
|
||||
NSAutoreleasePool *pool;
|
||||
|
||||
if (t->_active == NO)
|
||||
pool = t->_autorelease_vars.current_pool;
|
||||
if (pool == nil && t->_active == NO)
|
||||
{
|
||||
[self new]; // Don't leak while exiting thread.
|
||||
pool = t->_autorelease_vars.current_pool;
|
||||
}
|
||||
pool = t->_autorelease_vars.current_pool;
|
||||
if (pool != nil)
|
||||
{
|
||||
(*pool->_addImp)(pool, @selector(addObject:), anObj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue