From f7b9855da78e70c51b61da8a4d67a374f3eb10bc Mon Sep 17 00:00:00 2001 From: appleguy Date: Mon, 29 May 2017 10:59:11 -0700 Subject: [PATCH] [ASDisplayNode] Revise assertion to log until Issue #145 is addressed. (#313) [ASDisplayNode] Revise assertion to log until Issue #145 is addressed. #trivial --- Source/ASDisplayNode.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index 894b4cffa7..b6042722ef 100644 --- a/Source/ASDisplayNode.mm +++ b/Source/ASDisplayNode.mm @@ -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;