Skip to content

Commit

Permalink
Remove RCTDeviceInfo notification center observers when invalidating
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldonadel committed Dec 20, 2023
1 parent 0373329 commit 71b3ca6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-native/React/CoreModules/RCTDeviceInfo.mm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ - (void)initialize
- (void)invalidate
{
_invalidated = YES;
[[NSNotificationCenter defaultCenter] removeObserver:self];
}

static BOOL RCTIsIPhoneNotched()
Expand Down

0 comments on commit 71b3ca6

Please sign in to comment.