Closed bnjm closed 6 years ago
Seeing a lot of crashes come from here: https://github.com/react-native-ar/react-native-arkit/blob/master/ios/RCTARKitNodes.m#L344, maybe it helps to return early from this method.
Edit: Actually I think I misunderstood what [node removeFromParentNode]; is doing. First assumption was that objc deallocates unattached nodes so that [self.nodes removeObjectForKey:nodeId]; wouldn't be necessary after removing it from the parent. https://developer.apple.com/documentation/scenekit/scnnode/1407991-removefromparentnode?language=objc
[node removeFromParentNode];
[self.nodes removeObjectForKey:nodeId];
Seeing a lot of crashes come from here: https://github.com/react-native-ar/react-native-arkit/blob/master/ios/RCTARKitNodes.m#L344, maybe it helps to return early from this method.
Edit: Actually I think I misunderstood what
[node removeFromParentNode];
is doing. First assumption was that objc deallocates unattached nodes so that[self.nodes removeObjectForKey:nodeId];
wouldn't be necessary after removing it from the parent. https://developer.apple.com/documentation/scenekit/scnnode/1407991-removefromparentnode?language=objc