I have Samsung Galaxy S4 (Android 5.0.1). I tested 2 applications with a WebView.
1) In one of them a geographical map is used with marks and lines (paths). After 10-20 shifts and zooms it crushed with OutOfMemory.
2) In the second a site of a company is used integrated in Cordova. After 20-60 page loadings it also crushes with OutOfMemory. When I see a memory allocation, it acts like a saw: after an increase up to some limit it frees, then again increases. After 2-4 peaks it crushes.
On some other devices these crushes are not reproduced. The same is in replies at PlayMarket.
I read many articles including http://www.dwmkerr.com/fixing-memory-leaks-in-angularjs-applications/. An application uses Angular JS. When I tested it in Chrome and Firefox developer's console I saw that after peaks up to 12 Mb a garbage collector in a browser started.
I have these questions.
1) Does a WebView have it's own garbage collector (I think, Javascript GC)?
2) If a WebView is just a View, why it is not destoroyed, but a whole application crushes?
3) How Android GC can affect WebView (maybe Chromium GC) and how WebView can tell Android GC to free a memory?