mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASDisplayNode] Revise assertion to log until Issue #145 is addressed. #trivial
This commit is contained in:
@@ -404,8 +404,14 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
|
||||
_flags.isDeallocating = YES;
|
||||
|
||||
// Synchronous nodes may not be able to call the hierarchy notifications, so only enforce for regular nodes.
|
||||
ASDisplayNodeAssert(checkFlag(Synchronous) || !ASInterfaceStateIncludesVisible(_interfaceState), @"Node should always be marked invisible before deallocating. Node: %@", self);
|
||||
|
||||
// TODO: This condition should be an assertion, but a workaround is in place until the root issue is fixed:
|
||||
// https://github.com/TextureGroup/Texture/issues/145
|
||||
#if DEBUG
|
||||
if (checkFlag(Synchronous) == NO && ASInterfaceStateIncludesVisible(_interfaceState) == YES) {
|
||||
NSLog(@"Node should always be marked invisible before deallocating. Node: %@", self);
|
||||
}
|
||||
#endif
|
||||
|
||||
self.asyncLayer.asyncDelegate = nil;
|
||||
_view.asyncdisplaykit_node = nil;
|
||||
_layer.asyncdisplaykit_node = nil;
|
||||
|
||||
Reference in New Issue
Block a user