Cover the other background dealloc surfaces

This commit is contained in:
Michael Zuccarino
2019-04-22 17:51:57 -07:00
parent 5aef12d4fb
commit ca074687df
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -84,7 +84,7 @@
[self animatedImageSet:animatedImage previousAnimatedImage:previousAnimatedImage];
// Animated image can take while to dealloc, do it off the main queue
if (previousAnimatedImage != nil) {
if (previousAnimatedImage != nil && ASActivateExperimentalFeature(ASExperimentalOOMBackgroundDeallocDisable) == NO) {
ASPerformBackgroundDeallocation(&previousAnimatedImage);
}
});
+1 -1
View File
@@ -268,7 +268,7 @@ typedef void (^ASImageNodeDrawParametersBlock)(ASWeakMapEntry *entry);
CGSize oldImageSize = oldImage.size;
BOOL shouldReleaseImageOnBackgroundThread = oldImageSize.width > kMinReleaseImageOnBackgroundSize.width
|| oldImageSize.height > kMinReleaseImageOnBackgroundSize.height;
if (shouldReleaseImageOnBackgroundThread) {
if (shouldReleaseImageOnBackgroundThread && ASActivateExperimentalFeature(ASExperimentalOOMBackgroundDeallocDisable) == NO) {
ASPerformBackgroundDeallocation(&oldImage);
}
}
+1 -1
View File
@@ -548,7 +548,7 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
BOOL shouldReleaseImageOnBackgroundThread = imageSize.width > kMinReleaseImageOnBackgroundSize.width ||
imageSize.height > kMinReleaseImageOnBackgroundSize.height;
[self _setImage:nil];
if (shouldReleaseImageOnBackgroundThread) {
if (shouldReleaseImageOnBackgroundThread && ASActivateExperimentalFeature(ASExperimentalOOMBackgroundDeallocDisable) == NO) {
ASPerformBackgroundDeallocation(&image);
}
}