fix(ios) remove observers on dealloc for RCTDeviceInfo
This commit is contained in:
parent
a711a0e4bb
commit
b84bb7d64b
|
@ -1,3 +1,19 @@
|
|||
diff --git a/node_modules/react-native/React/CoreModules/RCTDeviceInfo.mm b/node_modules/react-native/React/CoreModules/RCTDeviceInfo.mm
|
||||
index 8e21fa5..f9dfb5f 100644
|
||||
--- a/node_modules/react-native/React/CoreModules/RCTDeviceInfo.mm
|
||||
+++ b/node_modules/react-native/React/CoreModules/RCTDeviceInfo.mm
|
||||
@@ -70,6 +70,11 @@ - (void)initialize
|
||||
object:nil];
|
||||
}
|
||||
|
||||
+- (void)dealloc
|
||||
+{
|
||||
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
+}
|
||||
+
|
||||
static BOOL RCTIsIPhoneX()
|
||||
{
|
||||
static BOOL isIPhoneX = NO;
|
||||
diff --git a/node_modules/react-native/React/CoreModules/RCTTiming.mm b/node_modules/react-native/React/CoreModules/RCTTiming.mm
|
||||
index 13d0d57..00e5d4c 100644
|
||||
--- a/node_modules/react-native/React/CoreModules/RCTTiming.mm
|
||||
|
|
Loading…
Reference in New Issue