I'm on iOS now, but the question applies to Android too. I'm looking at the memory graph in Xcode, and my app crashes whenever it hits around 240MB, I believe iOS is killing it because it's taking too much memory.
I can consistently get it to crash by navigating between pages in the app. (It's a SPA, client-side HTML rendering.) If I stop navigating for a minute, the memory will go down to 140MB.
Here is same page in OSX Chrome:
In this case, after ceasing navigation, the memory does not decrease on it's own. Instead, the cliff at the end of the graph is me hitting the garbage collection button (takes it down from 170MB to 60MB).
How do I stop my app from crashing?
Also, here is the Chrome graph with HTML nodes – grow proportionally but the nodes stay at same level post garbage collection.