iOS6 MKMapView using a ton of memory, to the point of crashing the app, anyone else notice this?

After a lot of playing around and testing different ideas, some of which were mentioned here, the final solution that worked for me was as follows.

  • Instead of creating new MKMapView's as needed in the app, I added an mkMapView property to my AppDelegate and only created it when needed. Once it has been created, it lives in the AppDelegate forever and I reuse that single instance everywhere needed. This really helped in reducing the amount of memory being used as I was previously instantiating a couple different MKMapView's and both were burning through memory pretty quickly.

  • I also found that iOS 6 Maps handles releasing memory very well once a Memory Warning has been received. Yes, it does use up more memory while zooming and panning, but seems to be responding to Memory Warnings appropriately.

  • The last thing I had to do was work on reducing my overall initial memory footprint. I noticed I was starting off way higher than I expected so that was also contributing to the crashes I was receiving related to memory. Once I got the initial footprint down, let MKMapView handle releasing it's memory during Memory Warnings, and made sure I only had 1 instance of MKMapView that I could reuse throughout the app, everything is running fine.


I'm also having this problem and its driving me nuts. Trying to figure out a hotfix based on mateo's post, this is what I came up with:

- (void)applyMapViewMemoryHotFix{

    switch (self.mkMapView.mapType) {
        case MKMapTypeHybrid:
        {
            self.mkMapView.mapType = MKMapTypeStandard;
        }

            break;
        case MKMapTypeStandard:
        {
            self.mkMapView.mapType = MKMapTypeHybrid;
        }

            break;
        default:
            break;
    }

    [self.mkMapView removeFromSuperview];
    self.mkMapView = nil;
}

Im not sure why, but the combination of removing from superview and then setting to nil really reduces the memory usage. I call this method in the controller's viewDidDisappear.

Other things I tried but without significant effect:

1) Creating autoreleasepool around alloc init of the mkMapView

2) Setting displayed region around lat 84 lon -30 as I thought Vector Information in the Arctic might not be as dense... However, doesnt help ;)

This issue is very serious and causes our app to be unstable and cause tons of memory warnings in iOS 6. Sure hope that Apple releases a better hotfix than mine... soon!!

Please critique my hotfix and come up with more effective methods to cut memory usage when discarding a map. Thanks!


I experience the same issue.

Memory is never released after zoom and change location.

The only trick i've found is to change map type after memory warning.


This issue is still present in iOS 9 - unless you do this.

Segue to and from a view controller with a map view that has been set up in a story board causes a crash (for me) after about 10-15 show and dismiss cycles.

Now it appears the fix is simple. Adding this

override func viewDidDisappear(animated: Bool) {
    super.viewDidDisappear(animated)
    mapView.removeFromSuperview()
}

Seems to have fix the issue, the can cycle to and from more than 20 times, and no issue. No crash!!

Hope this helps. This was a frustrating problem and glad its solved.