mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +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:
@@ -907,4 +907,24 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
[super endUpdates];
|
||||
}
|
||||
|
||||
#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