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 (TextureGroup#1424)

* Dont forget about these collection view background deallocs

* Also Table view for completeness
  • Loading branch information
mikezucc authored and hebertialmeida committed May 10, 2019
1 parent b6a6b0f commit a631803
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 a631803

Please sign in to comment.