Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Be sure to end the background task in dealloc

  • Loading branch information...
commit 70d83ca5285b784ff67420301b09bd6033693ced 1 parent ab55db8
@hwaxxer hwaxxer authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 Classes/Framework/ReadmillRequestOperation.m
View
7 Classes/Framework/ReadmillRequestOperation.m
@@ -47,8 +47,11 @@ - (void)dealloc
[self setRequest:nil];
[self setUploadProgressBlock:nil];
[self setDownloadProgressBlock:nil];
- [self setBackgroundTaskIdentifier:UIBackgroundTaskInvalid];
-
+ if (_backgroundTaskIdentifier) {
+ [[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier];
+ [self setBackgroundTaskIdentifier:UIBackgroundTaskInvalid];
+ }
+
[super dealloc];
}
Please sign in to comment.
Something went wrong with that request. Please try again.