Release kMXKAccountAPNSActivityDidChangeNotification observer when deallocation controller

Signed-off-by: Nicolas Buquet <nbuquet@buquet-net.com>
This commit is contained in:
Nicolas Buquet
2023-10-10 11:45:14 +02:00
parent 4b53d1e61a
commit 5bccf1627a
2 changed files with 10 additions and 0 deletions

View File

@@ -340,6 +340,15 @@ SSOAuthenticationPresenterDelegate>
self.screenTracker = [[AnalyticsScreenTracker alloc] initWithScreen:AnalyticsScreenSettings];
}
- (void)dealloc {
// Remove observers
if (pushInfoUpdateObserver)
{
[[NSNotificationCenter defaultCenter] removeObserver:pushInfoUpdateObserver name:kMXKAccountAPNSActivityDidChangeNotification object:nil];
pushInfoUpdateObserver = nil;
}
}
- (void)updateSections
{
NSMutableArray<Section*> *tmpSections = [NSMutableArray arrayWithCapacity:SECTION_TAG_DEACTIVATE_ACCOUNT + 1];

View File

@@ -0,0 +1 @@
Remove registered observer kMXKAccountAPNSActivityDidChangeNotification in dealloc of SettingsViewController