mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Avoid triggering main thread assertions in collection/table dealloc #trivial (#803)
* Avoid triggering main thread assertions in ASCollectionNode/ASTableNode dealloc * Put it back
This commit is contained in:
@@ -172,12 +172,17 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
#if ASDISPLAYNODE_ASSERTIONS_ENABLED
|
||||
- (void)dealloc
|
||||
{
|
||||
if ([self isNodeLoaded]) {
|
||||
ASDisplayNodeAssert(self.view.superview == nil, @"Node's view should be removed from hierarchy.");
|
||||
if (self.nodeLoaded) {
|
||||
__weak UIView *view = self.view;
|
||||
ASPerformBlockOnMainThread(^{
|
||||
ASDisplayNodeCAssertNil(view.superview, @"Node's view should be removed from hierarchy.");
|
||||
});
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma mark ASDisplayNode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user