Does UIWebView leak memory?

前端 未结 4 1054
陌清茗
陌清茗 2020-12-03 06:05

If your iPhone app uses a UIWebView, and loads many pages with large images, you may find that you are leaking memory. Can this be resolved?

4条回答
  •  醉梦人生
    2020-12-03 06:34

    Try adding

    [webView loadHTMLString: @"" baseURL: nil];
    

    right before you release the webview. For a leak in 4.2.1 relating to displaying a PDF in a UIWebView this solves most of the leak problems for me.

提交回复
热议问题