diff options
author | Ilya Grechuhin <i.grechuhin@mapswithme.com> | 2015-09-18 17:46:19 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:06:32 +0300 |
commit | 52223899ee900fa8a0852c64a3ee94b7ae8e45e1 (patch) | |
tree | 88cddcce86b21947eb80e298fa038828e7148953 | |
parent | a874631edbe84b670f062e4375874cdb5461d27c (diff) |
[ios] Detached delegate on dealloc.
-rw-r--r-- | iphone/Maps/Classes/LocalNotificationManager.mm | 5 | ||||
-rw-r--r-- | iphone/Maps/Platform/LocationManager.mm | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/iphone/Maps/Classes/LocalNotificationManager.mm b/iphone/Maps/Classes/LocalNotificationManager.mm index 89ff33561d..ce6dad1f80 100644 --- a/iphone/Maps/Classes/LocalNotificationManager.mm +++ b/iphone/Maps/Classes/LocalNotificationManager.mm @@ -43,6 +43,11 @@ typedef void (^CompletionHandler)(UIBackgroundFetchResult); return manager; } +- (void)dealloc +{ + _locationManager.delegate = nil; +} + - (void)processNotification:(UILocalNotification *)notification onLaunch:(BOOL)onLaunch { NSDictionary * userInfo = [notification userInfo]; diff --git a/iphone/Maps/Platform/LocationManager.mm b/iphone/Maps/Platform/LocationManager.mm index 5d8c284194..3bcdcfbf4b 100644 --- a/iphone/Maps/Platform/LocationManager.mm +++ b/iphone/Maps/Platform/LocationManager.mm @@ -48,6 +48,7 @@ static NSString * const kAlohalyticsLocationRequestAlwaysFailed = @"$locationAlw - (void)dealloc { + m_locationManager.delegate = nil; [[NSNotificationCenter defaultCenter] removeObserver:self]; } |