From b1b48cca818f4d539d36921a7d2b844f2cb4beee Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Wed, 5 Sep 2018 22:07:34 +0800 Subject: [PATCH] Remove kCGImageSourceShouldCache option when create image source --- SDWebImage/SDImageAPNGCoder.m | 3 +-- SDWebImage/SDImageGIFCoder.m | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/SDWebImage/SDImageAPNGCoder.m b/SDWebImage/SDImageAPNGCoder.m index 8c58aa1b..64384122 100644 --- a/SDWebImage/SDImageAPNGCoder.m +++ b/SDWebImage/SDImageAPNGCoder.m @@ -326,8 +326,7 @@ const CFStringRef kCGImagePropertyAPNGUnclampedDelayTime = (__bridge CFStringRef } self = [super init]; if (self) { - // use Image/IO cache because it's already keep a balance between CPU & memory - CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)@{(__bridge NSString *)kCGImageSourceShouldCache : @(YES)}); + CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL); if (!imageSource) { return nil; } diff --git a/SDWebImage/SDImageGIFCoder.m b/SDWebImage/SDImageGIFCoder.m index 008a2b0b..2bea5b94 100644 --- a/SDWebImage/SDImageGIFCoder.m +++ b/SDWebImage/SDImageGIFCoder.m @@ -327,8 +327,7 @@ } self = [super init]; if (self) { - // use Image/IO cache because it's already keep a balance between CPU & memory - CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)@{(__bridge NSString *)kCGImageSourceShouldCache : @(YES)}); + CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL); if (!imageSource) { return nil; }