[ReactNative] Fix RootContentView release when the top-level bridge is held

Summary:
The RCTRootView creates a underlying RCTRootContentView that was deallocated when
the bridge modules were deallocated. That doesn't work when the bridge is held.

@public

Test Plan:
Launch Groups, put a breakpoint on `-[RCTRootContentView dealloc]`, enter and
leave a group page. It should be called now.
This commit is contained in:
Tadeu Zagallo
2015-05-12 07:44:38 -07:00
committed by Christopher Chedeau
parent a142ed50ff
commit 92d7324f15
3 changed files with 18 additions and 12 deletions

View File

@@ -281,7 +281,7 @@ static NSDictionary *RCTViewConfigForModule(Class managerClass, NSString *viewNa
dispatch_async(dispatch_get_main_queue(), ^{
for (NSNumber *rootViewTag in _rootViewTags) {
((UIView *)_viewRegistry[rootViewTag]).userInteractionEnabled = NO;
[_viewRegistry[rootViewTag] invalidate];
}
_rootViewTags = nil;