diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 6f9c22465f..39698f765f 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -340,6 +340,11 @@ - (void)finalizeInit self.screenTracker = [[AnalyticsScreenTracker alloc] initWithScreen:AnalyticsScreenSettings]; } +- (void)dealloc { + // Fix for destroy not being called + [self destroy]; +} + - (void)updateSections { NSMutableArray *tmpSections = [NSMutableArray arrayWithCapacity:SECTION_TAG_DEACTIVATE_ACCOUNT + 1]; diff --git a/changelog.d/Settings-controller-dealloc-observer.bugfix b/changelog.d/Settings-controller-dealloc-observer.bugfix new file mode 100644 index 0000000000..b52c547ad6 --- /dev/null +++ b/changelog.d/Settings-controller-dealloc-observer.bugfix @@ -0,0 +1 @@ +Call destroy in dealloc to remove all observers of SettingsViewController \ No newline at end of file