mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
LogBox - Deallocate _rootViewController to release surface reference and break cycle
Summary: This def breaks a reference cycle in logbox causing a memory leak in development. Changelog: [iOS] [Fix] LogBox - Fix dependency cycle Reviewed By: PeteTheHeat Differential Revision: D19768068 fbshipit-source-id: 518b9c66499aa092465a9213f955965bffeebd88
This commit is contained in:
committed by
Facebook Github Bot
parent
7bd1abec35
commit
6ba2aeefa8
@@ -70,8 +70,12 @@
|
||||
|
||||
- (void)show
|
||||
{
|
||||
__weak __typeof(self) weakSelf = self;
|
||||
[RCTSharedApplication().delegate.window.rootViewController presentViewController:_rootViewController animated:NO completion:^{
|
||||
[self->_rootViewController.view becomeFirstResponder];
|
||||
__strong __typeof(self) strongSelf = weakSelf;
|
||||
if (strongSelf) {
|
||||
[strongSelf->_rootViewController.view becomeFirstResponder];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user