1、项目使用TabBarController 添加4个界面 其中3个界面使用MKMapView
2、// 实时追踪
RealTimeTrackingViewController *realTimeTrackingVC = [[RealTimeTrackingViewController alloc] init];
[self setUpOneChildViewController:realTimeTrackingVC image:[UIImage imageNamed:@"tracking"] selectedImage:[UIImage imageWithOriginalName:@"trackingpress"] title:@"实时追踪" ];
_RealTimeTracking =realTimeTrackingVC;
//历史回放
HistoricalPlayViewController *historicalPlayVC = [[HistoricalPlayViewController alloc] init];
[self setUpOneChildViewController:historicalPlayVC image:[UIImage imageNamed:@"playback"] selectedImage:[UIImage imageWithOriginalName:@"playpress"] title:@"历史回放" ];
// 电子围栏
GeofenceViewController *geofenceVC = [[GeofenceViewController alloc] init];
[self setUpOneChildViewController:geofenceVC image:[UIImage imageNamed:@"geo"] selectedImage:[UIImage imageWithOriginalName:@"geopress"] title:@"电子围栏" ];
// 设备报警
VehicleAlarmViewController *vehicleAlarmVC = [[VehicleAlarmViewController alloc] init];
[self setUpOneChildViewController:vehicleAlarmVC image:[UIImage imageNamed:@"alarm"] selectedImage:[UIImage imageWithOriginalName:@"alarmpress"] title:@"设备警告"];
3、打开两个含有地图的界面后,内存达到近400MB
依次打开3个含有地图的界面后,内存再暴增到近500MB
最最关键的是:由于使用的是UITabBarController,切换界面时,界面是不会释放掉的,我不知道怎样才能释放MapView。。。。。
现在求帮助。。。。。。。。。。。