From dfd44e8b9efa32a7467f7930295e7d578efb7a76 Mon Sep 17 00:00:00 2001 From: Michael Zuccarino Date: Wed, 27 Mar 2019 11:23:27 -0700 Subject: [PATCH] [Experiment] Dont forget about these collection view background deallocs (#1424) * Dont forget about these collection view background deallocs * Also Table view for completeness --- Source/ASCollectionView.mm | 6 ++++-- Source/ASTableView.mm | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/ASCollectionView.mm b/Source/ASCollectionView.mm index 4ea24709..d8dc9fdf 100644 --- a/Source/ASCollectionView.mm +++ b/Source/ASCollectionView.mm @@ -334,8 +334,10 @@ static NSString * const kReuseIdentifier = @"_ASCollectionReuseIdentifier"; } // Data controller & range controller may own a ton of nodes, let's deallocate those off-main. - ASPerformBackgroundDeallocation(&_dataController); - ASPerformBackgroundDeallocation(&_rangeController); + if (ASActivateExperimentalFeature(ASExperimentalOOMBackgroundDeallocDisable) == NO) { + ASPerformBackgroundDeallocation(&_dataController); + ASPerformBackgroundDeallocation(&_rangeController); + } } #pragma mark - diff --git a/Source/ASTableView.mm b/Source/ASTableView.mm index 34b78eb6..9cae6878 100644 --- a/Source/ASTableView.mm +++ b/Source/ASTableView.mm @@ -373,8 +373,10 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; } // Data controller & range controller may own a ton of nodes, let's deallocate those off-main - ASPerformBackgroundDeallocation(&_dataController); - ASPerformBackgroundDeallocation(&_rangeController); + if (ASActivateExperimentalFeature(ASExperimentalOOMBackgroundDeallocDisable) == NO) { + ASPerformBackgroundDeallocation(&_dataController); + ASPerformBackgroundDeallocation(&_rangeController); + } } #pragma mark -