• <tfoot id='HZM53'></tfoot>
  • <small id='HZM53'></small><noframes id='HZM53'>

      <bdo id='HZM53'></bdo><ul id='HZM53'></ul>
      <legend id='HZM53'><style id='HZM53'><dir id='HZM53'><q id='HZM53'></q></dir></style></legend>
        <i id='HZM53'><tr id='HZM53'><dt id='HZM53'><q id='HZM53'><span id='HZM53'><b id='HZM53'><form id='HZM53'><ins id='HZM53'></ins><ul id='HZM53'></ul><sub id='HZM53'></sub></form><legend id='HZM53'></legend><bdo id='HZM53'><pre id='HZM53'><center id='HZM53'></center></pre></bdo></b><th id='HZM53'></th></span></q></dt></tr></i><div id='HZM53'><tfoot id='HZM53'></tfoot><dl id='HZM53'><fieldset id='HZM53'></fieldset></dl></div>

        (很多)UIWebView 内存泄漏

        时间:2023-11-09
        <i id='9xWCY'><tr id='9xWCY'><dt id='9xWCY'><q id='9xWCY'><span id='9xWCY'><b id='9xWCY'><form id='9xWCY'><ins id='9xWCY'></ins><ul id='9xWCY'></ul><sub id='9xWCY'></sub></form><legend id='9xWCY'></legend><bdo id='9xWCY'><pre id='9xWCY'><center id='9xWCY'></center></pre></bdo></b><th id='9xWCY'></th></span></q></dt></tr></i><div id='9xWCY'><tfoot id='9xWCY'></tfoot><dl id='9xWCY'><fieldset id='9xWCY'></fieldset></dl></div>
        <legend id='9xWCY'><style id='9xWCY'><dir id='9xWCY'><q id='9xWCY'></q></dir></style></legend>

            <small id='9xWCY'></small><noframes id='9xWCY'>

          1. <tfoot id='9xWCY'></tfoot>

                  <tbody id='9xWCY'></tbody>
                • <bdo id='9xWCY'></bdo><ul id='9xWCY'></ul>

                  本文介绍了(很多)UIWebView 内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我从其他帖子中看到 UIWebView 存在内存泄漏问题.但是,由于我泄漏的对象数量众多,我不得不怀疑我是否做错了什么.'Leaks' 报告了关于打开 UIWebView、加载页面和关闭(它是 Facebook 登录页面)的 60 次泄漏.我已经检查了这些对象中的每一个的堆栈跟踪,它们从未接触过我的代码.它们要么都在一个单独的线程中(我只使用主线程),要么从主"转到一堆灰色的内部方法.这是 UIWebView 预期的吗?我正在运行最新的固件,我认为他们现在已经修复了这个问题.顺便说一句,我在设备上看到了这个.我也尝试在苹果网站上检查错误,但除了通过问题 ID 之外没有其他方法可以搜索..?

                  I've seen from other posts that there are memory leaking issues with UIWebView. However, with the amount of objects that I have leaking, I have to wonder if I'm doing something wrong. 'Leaks' reports about 60 leaks for opening a UIWebView, loading a page and closing (it's the Facebook login page). I've check the stack trace for every one of these objects, and they never touch my code. They're all either in a separate thread (I only use the main thread), or go from 'main' to a bunch of internal methods that are greyed out. Is this expected from UIWebView? I'm running the latest firmware, and I think they would have fixed this by now. I'm seeing this on the device, by the way. I also tried checking for bugs on the apple site, but there's no way to search other than by issue ID..?

                  肖恩

                  这是泄漏的捕获:

                  推荐答案

                  很抱歉这么快就回答了我自己的问题,但我刚刚发现了问题.

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

                  如果您为委托方法返回 NO:

                  If you return NO for the delegate method:

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

                  然后释放 UIWebView,它会像上面描述的那样泄漏.返回 YES 可以解决问题.至少对我来说,到目前为止(4.3.3)的所有固件版本都会发生这种情况.我正在向 Apple 提交错误.

                  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.

                  这篇关于(很多)UIWebView 内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:将图像下载到捆绑包中? 下一篇:在现有的 HTML 输入字段中加载图像/徽标 - UIWebView

                  相关文章

                  • <bdo id='0224Z'></bdo><ul id='0224Z'></ul>
                  <i id='0224Z'><tr id='0224Z'><dt id='0224Z'><q id='0224Z'><span id='0224Z'><b id='0224Z'><form id='0224Z'><ins id='0224Z'></ins><ul id='0224Z'></ul><sub id='0224Z'></sub></form><legend id='0224Z'></legend><bdo id='0224Z'><pre id='0224Z'><center id='0224Z'></center></pre></bdo></b><th id='0224Z'></th></span></q></dt></tr></i><div id='0224Z'><tfoot id='0224Z'></tfoot><dl id='0224Z'><fieldset id='0224Z'></fieldset></dl></div>
                • <tfoot id='0224Z'></tfoot>

                    1. <legend id='0224Z'><style id='0224Z'><dir id='0224Z'><q id='0224Z'></q></dir></style></legend>

                      <small id='0224Z'></small><noframes id='0224Z'>