Skip to content

Commit

Permalink
Invalidate session when operation is finished
Browse files Browse the repository at this point in the history
From documentation:

The session object keeps a strong reference to the delegate until your app exits or explicitly invalidates the session. If you do not invalidate the session by calling the invalidateAndCancel or finishTasksAndInvalidate method, your app leaks memory until it exits.
  • Loading branch information
SoneeJohn committed Feb 19, 2020
1 parent cd037de commit a9e0159
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions XCDYouTubeKit/XCDURLGetOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ - (void)finish
{
self.isExecuting = NO;
self.isFinished = YES;
[self.session invalidateAndCancel];
}

#pragma mark -
Expand Down

0 comments on commit a9e0159

Please sign in to comment.