Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gaurikolarkar

macrumors newbie
Original poster
Apr 24, 2012
1
0
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

Suspended
Nov 25, 2005
17,980
5,565
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.