iOS 10中的MKMapView内存泄漏

kat*_*ndu 5 mkmapview swift ios10

我已经在我的项目中集成了MKMapView但是当我弹出那个控制器时它无法释放内存.我在iOS 10中遇到这个问题,我只在iOS 9中测试过它运行正常.

我尝试用下面的代码释放内存,但它不起作用.

let overlays = self.mapView.overlays
self.mapView.removeOverlays(overlays)
self.mapView.mapType = MKMapType.standard
self.mapView.showsUserLocation = false        
self.mapView.removeAnnotations(self.containerView.mapView.annotations)
self.mapView.delegate = nil
self.mapView.removeFromSuperview()
self.mapView = nil
Run Code Online (Sandbox Code Playgroud)