Reputation: 565
We came across this issue while investigating low memory crashes on iOS Mobile Safari.
Most noticeably on a large HTML5 application, like a HTML5 game, we've found a memory leak on the browser where memory will keep adding up on every refresh.
In our case, the app runs with about 300MB of real memory usage and it added up around 100MB on every refresh.
Most noticeably on iPad mini and iPad4, it would crash Mobile Safari immediately after a couple of refreshes.
Upvotes: 1
Views: 1508
Reputation: 565
After a long and painful endeavour, we've found the issue being caused by a memory leak on webkit.
It happens when you use a matchMedia listener and you don't de-register the event listener before unload.
To fix it, either do not use matchMedia at all, or be sure to de-register the matchMedia event listener onunload of the page.
We've found the issue was already reported at https://code.google.com/p/chromium/issues/detail?id=113983
Upvotes: 2