Make RCTUIManager and RCTDeviceInfo unsubscribe from NSNotificationCenter on

Reviewed By: fromcelticpark

Differential Revision: D5986167

fbshipit-source-id: 18131572361c4b3f5e0ed5c8f97833a21902cad1
This commit is contained in:
Dmitry Zakharov 2017-10-10 04:58:13 -07:00 committed by Facebook Github Bot
parent bbc3f603f1
commit 04ff184c12
2 changed files with 10 additions and 0 deletions

View File

@ -86,6 +86,11 @@ static NSDictionary *RCTExportedDimensions(RCTBridge *bridge)
};
}
- (void)dealloc
{
[NSNotificationCenter.defaultCenter removeObserver:self];
}
- (void)invalidate
{
RCTExecuteOnMainQueue(^{

View File

@ -79,6 +79,11 @@ RCT_EXPORT_MODULE()
return NO;
}
- (void)dealloc
{
[NSNotificationCenter.defaultCenter removeObserver:self];
}
- (void)invalidate
{
/**