I am using MapBox for navigation in my app. After selecting source and destination, I redirect it to Mapbox SDK by presenting the screen. At this moment my memory get increase 180mb, after get dismiss from controller ,my memory doesn't release and it get increase continuously. I have done the following on my viewDidDisappear.
override func viewWillDisappear(_ animated: Bool) {
UIApplication.shared.isIdleTimerDisabled = false
locationManager.showsBackgroundLocationIndicator = false
mapview = nil
suspendNotifications()
routeController.suspendLocationUpdates()
}
After multiple present and dismiss with different location, memory get increase to 680MB and after certain period app get crash.
I have attached the instruments screens , where it shows the mapbox functions which get increase after dismiss controller.