使用 Leakcanary 的 Android Chrome Facebook webview 内存泄漏

标签 android facebook memory-leaks chromium leakcanary

在使用 Facebook Webview 执行登录后,我随机遇到此泄漏

enter image description here enter image description here enter image description here

我发现了这个(唯一提到 com.android.org.chromium):

AW_RESOURCE__SRESOURCES(SAMSUNG.equals(MANUFACTURER) && SDK_INT == KITKAT) {
    @Override void add(ExcludedRefs.Builder excluded) {
      // AwResource#setResources() is called with resources that hold a reference to the
      // activity context (instead of the application context) and doesn't clear it.
      // Not sure what's going on there, input welcome.
      excluded.staticField("com.android.org.chromium.android_webview.AwResource", "sResources");
    }
  },

在这个类里面AndroidExcludedRefs.java

This class is a work in progress. You can help by reporting leak traces that seem to be caused by the Android SDK, here: https://github.com/square/leakcanary/issues/new

但我没有使用三星,所以我仍然遇到这个问题。
话说,这个泄漏是一个已知问题吗?可以忽略吗?

更新:我使用的是 Facebook SDK v3.19,我已经更新到 4.3,但问题仍然存在: enter image description here

最佳答案

最新版本的 Facebook SDK 中修复了一些内存泄漏问题。确保下载最新版本(截至目前为 v4.3)。

关于使用 Leakcanary 的 Android Chrome Facebook webview 内存泄漏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31136333/

相关文章:

ios - TIC TCP 连接失败 [4 :0x604000360300]: 1:61 Err(61) <1> HTTP load failed (error code: -1004

ios - Facebook 会将我的转化像素转发给相应的广告服务吗?

c - 如何释放临时字符串的内存?

c - 释放内存的正确方法

javascript - 使用 Google Chrome 确定内存泄漏的来源

android - Phonegap 导航和 session 维护

java - Mockito InvalidUseOfMatchersException,当尝试使用自定义回调作为参数对方法进行单元测试时

ios - 如何从 swift 3 facebook 图形请求中解析这个 JSON

android - 如何创建带有角覆盖的圆形按钮

android - 我们可以在 Android 应用程序中使用 Google 支付作为辅助方法吗?