UIWebView leak? Can someone confirm?

后端 未结 2 1738
太阳男子
太阳男子 2020-12-20 03:26

I was leak-testing my current project and I\'m stumped. I\'ve been browsing like crazy and tried everything except chicken sacrifice. I just created a tiny toy project app f

相关标签:
2条回答
  • 2020-12-20 03:36

    Try:

    - (void)webViewDidFinishLoad:(UIWebView *)webView {
      [[NSUserDefaults standardUserDefaults] setInteger:0 forKey:@"WebKitCacheModelPreferenceKey"];
    }
    

    From http://blog.techno-barje.fr/post/2010/10/04/UIWebView-secrets-part1-memory-leaks-on-xmlhttprequest

    0 讨论(0)
  • 2020-12-20 03:53

    Forgot about this question.

    The leak is not present in 4.1. I would assume the same for 4.2.

    0 讨论(0)
提交回复
热议问题