mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Substantially improve behavior of nested Table & Collection Nodes
This ensures memory cleanup happens correctly and introduces a new test project to support developing new features while stressing tough use cases for correctness.
This commit is contained in:
@@ -898,4 +898,24 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
[super performBatchUpdates:^{} completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - Memory Management
|
||||
|
||||
- (void)clearContents
|
||||
{
|
||||
for (NSArray *section in [_dataController completedNodes]) {
|
||||
for (ASDisplayNode *node in section) {
|
||||
[node recursivelyClearContents];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)clearFetchedData
|
||||
{
|
||||
for (NSArray *section in [_dataController completedNodes]) {
|
||||
for (ASDisplayNode *node in section) {
|
||||
[node recursivelyClearFetchedData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user