Revert #2792, the autoreleasepool does not solve the issue

This commit is contained in:
DreamPiggy 2022-11-08 21:49:26 +08:00
parent 6ce59aa8c1
commit 03b46475eb
1 changed files with 36 additions and 38 deletions

View File

@ -111,7 +111,6 @@
- (void)startPrefetchWithToken:(SDWebImagePrefetchToken * _Nonnull)token { - (void)startPrefetchWithToken:(SDWebImagePrefetchToken * _Nonnull)token {
for (NSURL *url in token.urls) { for (NSURL *url in token.urls) {
@autoreleasepool {
@weakify(self); @weakify(self);
SDAsyncBlockOperation *prefetchOperation = [SDAsyncBlockOperation blockOperationWithBlock:^(SDAsyncBlockOperation * _Nonnull asyncOperation) { SDAsyncBlockOperation *prefetchOperation = [SDAsyncBlockOperation blockOperationWithBlock:^(SDAsyncBlockOperation * _Nonnull asyncOperation) {
@strongify(self); @strongify(self);
@ -155,7 +154,6 @@
[self.prefetchQueue addOperation:prefetchOperation]; [self.prefetchQueue addOperation:prefetchOperation];
} }
} }
}
#pragma mark - Cancel #pragma mark - Cancel
- (void)cancelPrefetching { - (void)cancelPrefetching {