(lots of) UIWebView memory leaks

余生长醉 提交于 2019-12-01 14:31:00

Sorry to answer my own question so quickly, but I just found the problem.

If you return NO for the delegate method:

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;

and then release the UIWebView, it will leak as described above. Returning YES fixes the issue. At least for me, this is happening on all firmware revisions up to now (4.3.3). I am filing a bug with Apple.

Fellows! I cnow it's a bit late %) Researched this theme for a while and found a solution that works for me the best - use WKWebView it doesn't leak! That's it - so simple.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!