We have an app with fifty-some layers, a combination of raster tiles, vector tiles and features. On older iPads with 3GB RAM, it is very easy to reach the threshold where iOS kills the app, around 1.8 GB simply by panning around and interacting with the map.
I've found that when receiving didReceiveMemoryWarningNotification from iOS, if we simply do this:
let layers = self.map.operationalLayers
self.map.removeAllOperationalLayers()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.map.addOperationalLayers(layers)
}
The app releases several hundred megabytes of memory at little noticeable problems for the user.
Not sure how ArcGIS handles internal caching and memory storage, but I think that the library should respect the notification and do its best to clean up unneeded resources. Although the above works for us, I suspect that Esri is in a position to more targeted clear the appropriate memory and provide better user experience.
Also, I'd love for there to be an explicitly callable API to flush caches.