Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@mapswithme.com>2015-09-18 17:46:19 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:06:32 +0300
commit52223899ee900fa8a0852c64a3ee94b7ae8e45e1 (patch)
tree88cddcce86b21947eb80e298fa038828e7148953
parenta874631edbe84b670f062e4375874cdb5461d27c (diff)
[ios] Detached delegate on dealloc.
-rw-r--r--iphone/Maps/Classes/LocalNotificationManager.mm5
-rw-r--r--iphone/Maps/Platform/LocationManager.mm1
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];
}