mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +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
9585061ccf
commit
7ee4008457
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-01-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSAutoreleasePool.m: ([addObject:]) fix error in check for
|
||||||
|
missing pool during thread exit.
|
||||||
|
|
||||||
2006-01-19 Richard Frith-Macdonald <rfm@gnu.org>
|
2006-01-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Tools/plget.m: remove unused variable
|
* Tools/plget.m: remove unused variable
|
||||||
|
|
|
@ -231,11 +231,12 @@ static IMP initImp;
|
||||||
NSThread *t = GSCurrentThread();
|
NSThread *t = GSCurrentThread();
|
||||||
NSAutoreleasePool *pool;
|
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.
|
[self new]; // Don't leak while exiting thread.
|
||||||
|
pool = t->_autorelease_vars.current_pool;
|
||||||
}
|
}
|
||||||
pool = t->_autorelease_vars.current_pool;
|
|
||||||
if (pool != nil)
|
if (pool != nil)
|
||||||
{
|
{
|
||||||
(*pool->_addImp)(pool, @selector(addObject:), anObj);
|
(*pool->_addImp)(pool, @selector(addObject:), anObj);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue