Merge pull request #3167 from younata/no_data_copy_in_decoding

Don't unnecessarily copy image data in the Download Operation
This commit is contained in:
DreamPiggy 2021-02-02 17:44:28 +08:00 committed by GitHub
commit f9b80167f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -452,7 +452,7 @@ didReceiveResponse:(NSURLResponse *)response
[self done];
} else {
if ([self callbacksForKey:kCompletedCallbackKey].count > 0) {
NSData *imageData = [self.imageData copy];
NSData *imageData = self.imageData;
self.imageData = nil;
// data decryptor
if (imageData && self.decryptor) {