Skip to content

Commit

Permalink
remove observer when dealloc
Browse files Browse the repository at this point in the history
  • Loading branch information
AGulev committed Nov 7, 2023
1 parent 656e8a5 commit 0e18c79
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extension-admob/src/admob_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@ - (void)orientationDidChange:(NSNotification *)notification {
[self performSelector:@selector(UpdatePosition) withObject:nil afterDelay:0.1];
}

- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil];
[super dealloc];
}

@end

#endif

0 comments on commit 0e18c79

Please sign in to comment.