Question

I am currently working on an ios7 project that uses uiwebview. There seems to be large memory usage occurring with the use of uiwebivews, mainly we open a new view with a webview for reading mobile html news articles.

We are trying to improve the memory management as it seems that the app hits the "closed due to memory pressure"

I have implemented the memory leak prevention outlined here: http://www.codercowboy.com/code-uiwebview-memory-leak-prevention/

My question though is there a difference in memory usage when using the scrollview to scroll down the content versus just having the uiwebview's frame be the size of the content for a view?

We are currently not using the scrollview and just showing the entire page.

Was it helpful?

Solution

Embedding a UIWebView inside a UIScrollView shouldn't make any memory usage differences at all. Are you sure this is a webview issue? Have you tried making a simple app only containing a webview and pointing it at your page and seeing what happens? You may be leaking/wasting memory elsewhere in your app that needs to be cleaned up.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top