1

In my app, I've noticed that as I push and pop a view controller containing an MKMapView, memory usage steadily increases. I've determined that there is a problem with MapKit itself, not my code, though. I made a test project containing simply a navigation controller in which I repeatedly can push and pop a view controller containing nothing but a map view - no annotations or overlays.

My results indicate that this is a bug in iOS 6; in the iOS 6 simulator I see the gradual increase in memory usage. I suppose this is an issue with Apple's new in-house maps.

Any thoughts as to why this is happening?

Carl Veazey
  • 18,392
  • 8
  • 66
  • 81
user2526811
  • 1,233
  • 4
  • 20
  • 54

1 Answers1

0

If you push and pop the MKMapView in code over and over, you might want to make sure that you are letting control back to iOS so that it can actually release the view (Not putting the push and pop in a while(1) loop that is).

Maybe you should try turning off ARC and make explicit retain and release calls to the map view and see if you get better results, just as an experiment?

www.jensolsson.se
  • 3,023
  • 2
  • 35
  • 65
  • 1
    I am not do any retain for map view. If i just push on the mapview, it suddenly incrase the memory for 20MB or grater than this. – user2526811 Aug 24 '13 at 09:56
  • Well I think it would actually be interesting to actually do retain and release on the map view each time, to see if it would clear up the issue. But you will need to disable ARC to try this. Here you can see how to disable it for a single source file: http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project – www.jensolsson.se Aug 24 '13 at 09:59
  • same problem as this : [http://stackoverflow.com/questions/12641658/ios6-mkmapview-using-a-ton-of-memory-to-the-point-of-crashing-the-app-anyone-e/14198121#14198121] – user2526811 Aug 24 '13 at 10:04