mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Fix retain/release error which caused a crash on removal of an old operation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39877 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
00cec80391
commit
21d242b151
1 changed files with 5 additions and 4 deletions
|
@ -920,7 +920,7 @@ static NSOperationQueue *mainQueue = nil;
|
|||
|
||||
when = [[NSDate alloc] initWithTimeIntervalSinceNow: 5.0];
|
||||
found = [internal->cond lockWhenCondition: 1 beforeDate: when];
|
||||
[when release];
|
||||
RELEASE(when);
|
||||
if (NO == found)
|
||||
{
|
||||
break; // Idle for 5 seconds ... exit thread.
|
||||
|
@ -928,7 +928,7 @@ static NSOperationQueue *mainQueue = nil;
|
|||
|
||||
if ([internal->starting count] > 0)
|
||||
{
|
||||
op = [internal->starting objectAtIndex: 0];
|
||||
op = RETAIN([internal->starting objectAtIndex: 0]);
|
||||
[internal->starting removeObjectAtIndex: 0];
|
||||
}
|
||||
else
|
||||
|
@ -958,7 +958,7 @@ static NSOperationQueue *mainQueue = nil;
|
|||
[NSThread setThreadPriority: [op threadPriority]];
|
||||
[op main];
|
||||
}
|
||||
[opPool release];
|
||||
RELEASE(opPool);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -967,6 +967,7 @@ static NSOperationQueue *mainQueue = nil;
|
|||
}
|
||||
NS_ENDHANDLER
|
||||
[op _finish];
|
||||
RELEASE(op);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -974,7 +975,7 @@ static NSOperationQueue *mainQueue = nil;
|
|||
[internal->lock lock];
|
||||
internal->threadCount--;
|
||||
[internal->lock unlock];
|
||||
[pool release];
|
||||
RELEASE(pool);
|
||||
[NSThread exit];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue