Added auto release pool to keep memory foot print down when retrieving image from disk in queryDiskCacheForKey
This commit is contained in:
parent
7d6e17c43c
commit
9f4e6915c7
|
@ -194,6 +194,8 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
|
|||
}
|
||||
|
||||
dispatch_async(self.ioQueue, ^
|
||||
{
|
||||
@autoreleasepool
|
||||
{
|
||||
UIImage *diskImage = [UIImage decodedImageWithImage:SDScaledImageForPath(key, [NSData dataWithContentsOfFile:[self cachePathForKey:key]])];
|
||||
|
||||
|
@ -207,6 +209,7 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
|
|||
{
|
||||
doneBlock(diskImage, SDImageCacheTypeDisk);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue