From 0e047941e96b4aabda9154cd5f733387fc375002 Mon Sep 17 00:00:00 2001 From: Katsuma Ito Date: Tue, 20 Jan 2015 18:31:07 +0800 Subject: [PATCH] Clear SDWebImagePrefetcher progressBlock when it has completed If progressblock captures objects, captured objects remain until next SDWebImagePrefetcher works. So, nil clear progressBlock as well as completionBlock. --- SDWebImage/SDWebImagePrefetcher.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SDWebImage/SDWebImagePrefetcher.m b/SDWebImage/SDWebImagePrefetcher.m index 7855eea47..5c69a2884 100644 --- a/SDWebImage/SDWebImagePrefetcher.m +++ b/SDWebImage/SDWebImagePrefetcher.m @@ -94,6 +94,7 @@ - (void)startPrefetchingAtIndex:(NSUInteger)index { self.completionBlock(self.finishedCount, self.skippedCount); self.completionBlock = nil; } + self.progressBlock = nil; } }]; }