Hi
I have been spending the last couple of days debugging a very similar issue to this:
http://stackoverflow.com/questions/30813443/how-can-you-control-memory-usage-in-cordova
My app is also cordova based, and it downloads a lof of data for offline usage.
Once you have more than 3-4 downloads, and start scrolling around on the map it starts crashing.
In short: the app itself does not leak (now, fixed one thing) but it appears the UIWebView/Safari engine crashes with
'Message from debugger: Terminated due to memory issue' once it starts consuming around 260-280MB.
App works great in Simulator, it only happens on a real device. (and it also works great when running app on other platforms).
I tried WKWebView instead of UIWebView, but it also crashes (uses less memory, but it also seems slower and does not always display data properly). WKWebView also has issues with file:// (which I of course I use) so avoiding it for now.
Its crashing in stock ios10 and the latest 10.2 beta 3. Mainly using a iPad4,5 and a iPhone7,1 (512MB and 1GB of memory I believe)
So questions:
1. Can you force a garbage collection in UIWebView/Safari ? Or prevent garbage collection ?
2. How is the memory limit set in Safari ? Why does it not crash in the Simulator ?
(no garbage collection maybe ?)
Any suggestions ?
Thanks
/ Heikki