PDA

View Full Version : Memory continues to increase when loading images to Webview




gaurikolarkar
Apr 24, 2012, 05:45 AM
I am loading HTML file which loads images using Javascript files to WebView. Every time when I load html file to Web view it shows me some memory increased in Activity Monitor. Even, when I release Webview then also it does not release the memory.

I am not caching the resources in Webview. But, when I used instruments to analyse the memory , it shows me images resources are cached in memory which does not get released.

I tried to load same HTML files in Safari browser, I found the same behavior.

Can anyone please guide me where I am missing? How can I optimize the memory loading to WebView?



gnasher729
Apr 24, 2012, 07:24 AM
I am loading HTML file which loads images using Javascript files to WebView. Every time when I load html file to Web view it shows me some memory increased in Activity Monitor. Even, when I release Webview then also it does not release the memory.

I am not caching the resources in Webview. But, when I used instruments to analyse the memory , it shows me images resources are cached in memory which does not get released.

I tried to load same HTML files in Safari browser, I found the same behavior.

Can anyone please guide me where I am missing? How can I optimize the memory loading to WebView?

Webview _is_ optimising it. The idea is that available RAM is free, but downloading images is expensive. The fact that it behaves the same in Safari should be a hint.