diff --git a/Schemas/configuration.json b/Schemas/configuration.json index 33b1f43c3..334e8a2fc 100644 --- a/Schemas/configuration.json +++ b/Schemas/configuration.json @@ -22,7 +22,7 @@ "exp_dealloc_queue_v2", "exp_collection_teardown", "exp_framesetter_cache", - "exp_clear_data_during_deallocation" + "exp_skip_clear_data" ] } } diff --git a/Source/ASCollectionView.mm b/Source/ASCollectionView.mm index 6bd33cf08..4543d1196 100644 --- a/Source/ASCollectionView.mm +++ b/Source/ASCollectionView.mm @@ -581,15 +581,9 @@ - (void)_asyncDelegateOrDataSourceDidChange { ASDisplayNodeAssertMainThread(); - if (_asyncDataSource == nil && _asyncDelegate == nil) { - if (ASActivateExperimentalFeature(ASExperimentalClearDataDuringDeallocation)) { - if (_isDeallocating) { - [_dataController clearData]; - } - } else { - [_dataController clearData]; - } - } + if (_asyncDataSource == nil && _asyncDelegate == nil && !ASActivateExperimentalFeature(ASExperimentalSkipClearData)) { + [_dataController clearData]; + } } - (void)setCollectionViewLayout:(nonnull UICollectionViewLayout *)collectionViewLayout diff --git a/Source/ASExperimentalFeatures.h b/Source/ASExperimentalFeatures.h index e8b987da0..8b85d312a 100644 --- a/Source/ASExperimentalFeatures.h +++ b/Source/ASExperimentalFeatures.h @@ -26,7 +26,7 @@ typedef NS_OPTIONS(NSUInteger, ASExperimentalFeatures) { ASExperimentalNetworkImageQueue = 1 << 5, // exp_network_image_queue ASExperimentalCollectionTeardown = 1 << 6, // exp_collection_teardown ASExperimentalFramesetterCache = 1 << 7, // exp_framesetter_cache - ASExperimentalClearDataDuringDeallocation = 1 << 8, // exp_clear_data_during_deallocation + ASExperimentalSkipClearData = 1 << 8, // exp_skip_clear_data ASExperimentalDidEnterPreloadSkipASMLayout = 1 << 9, // exp_did_enter_preload_skip_asm_layout ASExperimentalDisableAccessibilityCache = 1 << 10, // exp_disable_a11y_cache ASExperimentalFeatureAll = 0xFFFFFFFF diff --git a/Source/ASExperimentalFeatures.mm b/Source/ASExperimentalFeatures.mm index a638bedc3..e1e3fce55 100644 --- a/Source/ASExperimentalFeatures.mm +++ b/Source/ASExperimentalFeatures.mm @@ -20,7 +20,7 @@ @"exp_network_image_queue", @"exp_collection_teardown", @"exp_framesetter_cache", - @"exp_clear_data_during_deallocation", + @"exp_skip_clear_data", @"exp_did_enter_preload_skip_asm_layout", @"exp_disable_a11y_cache"])); diff --git a/Source/ASTableView.mm b/Source/ASTableView.mm index 36edc5f6c..4850495bb 100644 --- a/Source/ASTableView.mm +++ b/Source/ASTableView.mm @@ -514,14 +514,8 @@ - (void)_asyncDelegateOrDataSourceDidChange { ASDisplayNodeAssertMainThread(); - if (_asyncDataSource == nil && _asyncDelegate == nil) { - if (ASActivateExperimentalFeature(ASExperimentalClearDataDuringDeallocation)) { - if (_isDeallocating) { - [_dataController clearData]; - } - } else { - [_dataController clearData]; - } + if (_asyncDataSource == nil && _asyncDelegate == nil && !ASActivateExperimentalFeature(ASExperimentalSkipClearData)) { + [_dataController clearData]; } } diff --git a/Tests/ASConfigurationTests.mm b/Tests/ASConfigurationTests.mm index a6e936e4b..c340ea146 100644 --- a/Tests/ASConfigurationTests.mm +++ b/Tests/ASConfigurationTests.mm @@ -24,7 +24,7 @@ ASExperimentalNetworkImageQueue, ASExperimentalCollectionTeardown, ASExperimentalFramesetterCache, - ASExperimentalClearDataDuringDeallocation, + ASExperimentalSkipClearData, ASExperimentalDidEnterPreloadSkipASMLayout, ASExperimentalDisableAccessibilityCache }; @@ -47,7 +47,7 @@ + (NSArray *)names { @"exp_network_image_queue", @"exp_collection_teardown", @"exp_framesetter_cache", - @"exp_clear_data_during_deallocation", + @"exp_skip_clear_data", @"exp_did_enter_preload_skip_asm_layout", @"exp_disable_a11y_cache" ];