You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#793 introduced a new implementation of dealloc to ASCollectionNode and ASTableNode which asserts that the view's superview must be nil.
- (void)dealloc
{
if ([self isNodeLoaded]) {
ASDisplayNodeAssert(self.view.superview == nil, @"Node's view should be removed from hierarchy.");
}
}
However, I'm now seeing in my application that the main thread checker is failing when I deallocate an ASCollectionNode because dealloc is being called on a background thread:
-[UIView superview] must be used from main thread only
Looking at the stacktrace I get when in dealloc, it looks like ASDisplayNode's dealloc is explicitly handling the fact that it may be called off the main thread, so I suspect that's something that needs to be accounted for in ASCollectionNode and ASTableNode as well.
I'm not sure whether the right fix is not having the assertion, or doing something else to move the deallocation to the main thread.
The text was updated successfully, but these errors were encountered:
#793 introduced a new implementation of
dealloc
toASCollectionNode
andASTableNode
which asserts that the view's superview must be nil.However, I'm now seeing in my application that the main thread checker is failing when I deallocate an
ASCollectionNode
becausedealloc
is being called on a background thread:Looking at the stacktrace I get when in
dealloc
, it looks likeASDisplayNode
'sdealloc
is explicitly handling the fact that it may be called off the main thread, so I suspect that's something that needs to be accounted for inASCollectionNode
andASTableNode
as well.I'm not sure whether the right fix is not having the assertion, or doing something else to move the deallocation to the main thread.
The text was updated successfully, but these errors were encountered: