Merge pull request #116 from triplef/fix-nsoperation-completion-block

Fixed NSOperation completion block memory management.
This commit is contained in:
rfm 2020-04-10 11:05:41 +01:00 committed by GitHub
commit 4ae957746e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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