Skip to content

Commit

Permalink
[Experiment] Dont forget about these collection view background deall…
Browse files Browse the repository at this point in the history
…ocs (#1424)

* Dont forget about these collection view background deallocs

* Also Table view for completeness
  • Loading branch information
mikezucc committed Mar 27, 2019
1 parent 27cc0f2 commit dfd44e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Source/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,10 @@ - (void)dealloc
}

// 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 -
Expand Down
6 changes: 4 additions & 2 deletions Source/ASTableView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,10 @@ - (void)dealloc
}

// 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 -
Expand Down

0 comments on commit dfd44e8

Please sign in to comment.