Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the memory used by MKMapView be released some how?

I am using an MKMapView in my iPhone application. When I load this view, the activity monitor instrument shows that the real memory of my App is increasing significantly. It keeps going up as you move the map around or zoom in and out. Once the View controller that loads this view is removed, the memory that was allocated due to the usage of the mapView does not get freed up. Is there something that can be done to get all this memory back?

like image 383
gdr Avatar asked Jun 03 '10 05:06

gdr


1 Answers

Is this on the simulator, or the actual device? Some parts of the simulator behave slightly differently to the actual device, and the simulator may not be clearing out the cache properly (since it doesn't have to given the amount of RAM on a Mac compared to an iOS device).

Have you checked to see if you have a memory leak using Instruments? (again, you should do this on the actual device, since occasionally the simulator behaves slightly differently, and will show false positives/negatives when it comes to memory leaks)

like image 146
Nick Forge Avatar answered Nov 11 '22 10:11

Nick Forge