From f61cb62a5043a77e0cf59b225d1990d287ea6776 Mon Sep 17 00:00:00 2001 From: chicherin Date: Wed, 27 May 2015 10:42:24 +0600 Subject: [PATCH] https://github.com/mapbox/mapbox-ios-sdk/issues/633 https://github.com/mapbox/mapbox-ios-sdk/issues/634 --- MapView/Map/RMCircle.h | 2 +- MapView/Map/RMMapView.m | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MapView/Map/RMCircle.h b/MapView/Map/RMCircle.h index 9eae9a82e..b10ba5925 100644 --- a/MapView/Map/RMCircle.h +++ b/MapView/Map/RMCircle.h @@ -34,7 +34,7 @@ /** An RMCircle is used to represent a perfect circle shape on a map view. An RMCircle changes visible size in response to map zooms in order to consistently represent coverage of the same geographic area. */ @interface RMCircle : RMMapLayer { - RMMapView *mapView; + __weak RMMapView *mapView; CAShapeLayer *shapeLayer; UIColor *lineColor; diff --git a/MapView/Map/RMMapView.m b/MapView/Map/RMMapView.m index 302118409..f8e786805 100644 --- a/MapView/Map/RMMapView.m +++ b/MapView/Map/RMMapView.m @@ -470,6 +470,7 @@ - (void)dealloc [_zoomDelegateQueue cancelAllOperations]; [[NSNotificationCenter defaultCenter] removeObserver:self]; [_mapScrollView removeObserver:self forKeyPath:@"contentOffset"]; + _mapScrollView.delegate = nil; [_tileSourcesContainer cancelAllDownloads]; _locationManager.delegate = nil; [_locationManager stopUpdatingLocation];