Skip to content

Commit

Permalink
Clear SDWebImagePrefetcher progressBlock when it has completed
Browse files Browse the repository at this point in the history
If progressblock captures objects, captured objects remain until next SDWebImagePrefetcher works.
So, nil clear progressBlock as well as completionBlock.
  • Loading branch information
ka2n committed Jan 20, 2015
1 parent feca1e8 commit 0e04794
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SDWebImage/SDWebImagePrefetcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ - (void)startPrefetchingAtIndex:(NSUInteger)index {
self.completionBlock(self.finishedCount, self.skippedCount);
self.completionBlock = nil;
}
self.progressBlock = nil;
}
}];
}
Expand Down

0 comments on commit 0e04794

Please sign in to comment.