I have MKMapView in the view controller and when I start scaling it consumes a lot of memory and when I leave the view that contains MKMapView the memory is not freed (I use ARC in my application)
Edit
I read in some answers that I should put MKMapView in AppDelegate:
-(MKMapView*) mapView { if(_mapView == nil) { _mapView = [[MKMapView alloc] init]; } return _mapView; }
and in viewWillDisappear of viewController which contains MKMapView put
-(void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; XAppDelegate.mapView.delegate = nil; [XAppDelegate.mapView removeFromSuperview]; }
but that did not solve my problem.
source share