Fixed NSOperation completion block memory mgmt.

This commit is contained in:
Frederik Seiffert 2020-03-30 15:47:50 +02:00
parent 958dec0db2
commit cc56c9cc97
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2020-04-07 Frederik Seiffert <frederik@algoriddim.com>
* Source/NSOperation.m: Fix completion block memory management.
2020-04-05 Ivan Vucica <ivan@vucica.net>
* ANNOUNCE:

View file

@ -217,6 +217,7 @@ static NSArray *empty = nil;
RELEASE(internal->dependencies);
RELEASE(internal->cond);
RELEASE(internal->lock);
RELEASE(internal->completionBlock);
GS_DESTROY_INTERNAL(NSOperation);
}
[super dealloc];
@ -381,7 +382,7 @@ static NSArray *empty = nil;
- (void) setCompletionBlock: (GSOperationCompletionBlock)aBlock
{
internal->completionBlock = aBlock;
ASSIGNCOPY(internal->completionBlock, aBlock);
}
- (void) setQueuePriority: (NSOperationQueuePriority)pri