AnsweredAssumed Answered

10 MB memory leaks

Question asked by nklvmaxim on Jul 29, 2016
Latest reply on Aug 2, 2016 by DGoyal-esristaff

Issue: Huge memory leaks are observed using mapView.locationDisplay.startDataSource() in Swift.


It's happens when mapView.locationDisplay.stopDataSource() is called or not. It is called  from the UIViewController method - viewWillDisappear() or in other places with less frequency. Every time it eats about 10 MB.

Environment: XCode Version 7.3, Swift version 2.2, hardware - iPhone 6, iOS 9.3.2, the issue reproduces on the simulator, the issue reproduces for debug and release build. Any ideas to resolve this issue?


Code example is attached. It's modified webmap example from Esri. startDataSource() is called by pressing the button on the map view. Stop is called by pressing on the button again or by pressing Back in the navigation bar.

The lines of codes below were added. It's helps in the first case to prevent memory leaks. If user wants go back memory leaks are occurred.


            webmap.delegate = nil