From c3139d798af633bb81bf0da6df05b3c0beb0ced4 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Sun, 7 Jan 2018 22:06:13 -0800 Subject: [PATCH] Fixed crash happenned on deallocating RCTSurface Summary: Essentially, we had `dispatch_async` inside `delloc` method which tried to retain `self`, which is disallowed operation in ObjC runtime. However, we don't need to notify anything `surface`-related in `_stop` because it always is called from `dealloc`. Reviewed By: mmmulani Differential Revision: D6665631 fbshipit-source-id: ed0d192946f3323f4f54ecb99b30e56e0942f174 --- React/Base/Surface/RCTSurface.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/React/Base/Surface/RCTSurface.mm b/React/Base/Surface/RCTSurface.mm index c67ba985c8a6e8..736400953d535b 100644 --- a/React/Base/Surface/RCTSurface.mm +++ b/React/Base/Surface/RCTSurface.mm @@ -306,8 +306,6 @@ - (void)_stop method:@"unmountApplicationComponentAtRootTag" args:@[self->_rootViewTag] completion:NULL]; - - [self _setStage:RCTSurfaceStageSurfaceDidStop]; } - (void)_registerRootView