From 6133ec13acd8210890c8bdec3566468133e44391 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Fri, 18 Sep 2015 17:46:45 +0300 Subject: [PATCH] [ios] Detached observer on dealloc. --- iphone/Maps/ActiveMapsVC.mm | 5 +++++ iphone/Maps/CountryTreeVC.mm | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/iphone/Maps/ActiveMapsVC.mm b/iphone/Maps/ActiveMapsVC.mm index 557ff96a32..a6b2fd051a 100644 --- a/iphone/Maps/ActiveMapsVC.mm +++ b/iphone/Maps/ActiveMapsVC.mm @@ -33,6 +33,11 @@ extern NSString * const MapsStatusChangedNotification; return self; } +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + - (void)viewDidLoad { [super viewDidLoad]; diff --git a/iphone/Maps/CountryTreeVC.mm b/iphone/Maps/CountryTreeVC.mm index 1529dbd3ee..2cce8afa64 100644 --- a/iphone/Maps/CountryTreeVC.mm +++ b/iphone/Maps/CountryTreeVC.mm @@ -39,6 +39,11 @@ extern NSString * const MapsStatusChangedNotification; return self; } +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + - (void)viewDidLoad { [super viewDidLoad];