MKMapView的内存释放问题

来源:互联网 发布:淘宝购物车登陆 编辑:程序博客网 时间:2024/04/30 14:57

MKMapView的内存释放问题

by 伍雪颖

- (void)dealloc {    self.mapView.showsUserLocation = NO;    self.mapView.userTrackingMode  = MKUserTrackingModeNone;    [self.mapView.layer removeAllAnimations];    [self.mapView removeAnnotations:self.mapView.annotations];    [self.mapView removeOverlays:self.mapView.overlays];    [self.mapView removeFromSuperview];    self.mapView.delegate = nil;    self.mapView = nil;}

虽然不能释放全部的内存,但也能释放一部分的内存.


1 0