Tweaked the safe release methodology for the copied blocks to remove un-necessary autorelease.
This commit is contained in:
parent
f87c057cb8
commit
5cacab1b30
|
@ -129,9 +129,11 @@ static SDWebImageManager *instance;
|
||||||
// Check the on-disk cache async so we don't block the main thread
|
// Check the on-disk cache async so we don't block the main thread
|
||||||
[cacheDelegates addObject:delegate];
|
[cacheDelegates addObject:delegate];
|
||||||
[cacheURLs addObject:url];
|
[cacheURLs addObject:url];
|
||||||
SuccessBlock successCopy = SDWIAutorelease([success copy]);
|
SuccessBlock successCopy = [success copy];
|
||||||
FailureBlock failureCopy = SDWIAutorelease([failure copy]);
|
FailureBlock failureCopy = [failure copy];
|
||||||
NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:delegate, @"delegate", url, @"url", [NSNumber numberWithInt:options], @"options", successCopy, @"success", failureCopy, @"failure", nil];
|
NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:delegate, @"delegate", url, @"url", [NSNumber numberWithInt:options], @"options", successCopy, @"success", failureCopy, @"failure", nil];
|
||||||
|
SDWIRelease(successCopy);
|
||||||
|
SDWIRelease(failureCopy);
|
||||||
[[SDImageCache sharedImageCache] queryDiskCacheForKey:[url absoluteString] delegate:self userInfo:info];
|
[[SDImageCache sharedImageCache] queryDiskCacheForKey:[url absoluteString] delegate:self userInfo:info];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue