We have been working on a native iOS app for quite a while and have become frustrated trying to track down the causes of memory pressure warnings. We are not able to replicate the issue in a consistent manner to effectively trace/snapshot the application. One of our clients was using the app for a couple of weeks, creating over 200 detailed inspections with attachments. Then suddenly they are getting memory purge warnings every 2-5 inspections.
This is the only application running on the device .. all other applications have been terminated. The memory warnings persist even after the application is uninstalled and reinstalled .. which should have removed any data associated with the app. When the memory warnings occur, some devices have 750MB (out of 1GB) of system memory available, others only have 50-200MB. We can understand the warnings when there is only 50MB free, but 750MB?
We can log in as this user on a device with identical specs and view the same data and perform identical workflows with no issues. We are fairly certain that it's not related to the amount of data or the specific workflow. We are not forcibly caching anything in memory or using large collections. What we can't identify is if there is anything the Runtime SDK is doing behind the scenes that may be caching data or storing some other information that is loaded into memory.
The application specs are:
- Runtime SDK 10.2.4 against ArcGIS Server 10.2.2
- 4 AGSFeatureLayers, 1 AGSLocalTiledLayer, 1 AGSDynamicMapServiceLayer, 1 AGSTiledLayer
- search for features using AGSQueryTask
- AGSGDBFeatureTable and sqlite geodatabase with about 30000 point features
- synchs data to AGSFeatureLayer using applyEditsWithFeaturesToAdd and AGSAttachmentManager
- iOS 7.1.2 and iOS 8+