문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top