MKMapView memory usage steadily increasing

2019-02-23 12:05发布

问题:

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. As I push and pop the view controller over and over, memory usage increases by about .6 MB each push/pop cycle. Any thoughts as to why this is happening? I am using ARC. Thanks!

Edit:

I've done some testing in the iOS 5.1 simulator (I'm aware of the issues regarding profiling in the simulator, but I don't have any iOS 5 devices available for testing), and my results indicate that this is a bug in iOS 6; in the iOS 6 simulator I see the gradual increase in memory usage, but in the iOS 5 simulator, memory usage doesn't rise. I suppose this is an issue with Apple's new in-house maps.