mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Fixes for dealloc when init has not been called.
This commit is contained in:
parent
65b9b55e01
commit
6a723e5a87
5 changed files with 15 additions and 12 deletions
|
@ -193,7 +193,7 @@ static void *queuePriorityCtxt = (void*)"queuePriority";
|
|||
{
|
||||
/* Only clean up if ivars have been initialised
|
||||
*/
|
||||
if (internal && internal->lock)
|
||||
if (GS_EXISTS_INTERNAL)
|
||||
{
|
||||
NSOperation *op;
|
||||
|
||||
|
@ -800,13 +800,16 @@ static NSOperationQueue *mainQueue = nil;
|
|||
- (void) dealloc
|
||||
{
|
||||
[self cancelAllOperations];
|
||||
DESTROY(internal->operations);
|
||||
DESTROY(internal->starting);
|
||||
DESTROY(internal->waiting);
|
||||
DESTROY(internal->name);
|
||||
DESTROY(internal->cond);
|
||||
DESTROY(internal->lock);
|
||||
GS_DESTROY_INTERNAL(NSOperationQueue);
|
||||
if (GS_EXISTS_INTERNAL)
|
||||
{
|
||||
DESTROY(internal->operations);
|
||||
DESTROY(internal->starting);
|
||||
DESTROY(internal->waiting);
|
||||
DESTROY(internal->name);
|
||||
DESTROY(internal->cond);
|
||||
DESTROY(internal->lock);
|
||||
GS_DESTROY_INTERNAL(NSOperationQueue);
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue