mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Make RCTUIManager and RCTDeviceInfo unsubscribe from NSNotificationCenter on
Reviewed By: fromcelticpark Differential Revision: D5986167 fbshipit-source-id: 18131572361c4b3f5e0ed5c8f97833a21902cad1
This commit is contained in:
committed by
Facebook Github Bot
parent
bbc3f603f1
commit
04ff184c12
@@ -86,6 +86,11 @@ static NSDictionary *RCTExportedDimensions(RCTBridge *bridge)
|
||||
};
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)invalidate
|
||||
{
|
||||
RCTExecuteOnMainQueue(^{
|
||||
|
||||
@@ -79,6 +79,11 @@ RCT_EXPORT_MODULE()
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)invalidate
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user