在使用 Facebook
Webview
执行登录后,我随机遇到此泄漏
我发现了这个(唯一提到 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,但问题仍然存在:
最佳答案
最新版本的 Facebook SDK 中修复了一些内存泄漏问题。确保下载最新版本(截至目前为 v4.3)。
关于使用 Leakcanary 的 Android Chrome Facebook webview 内存泄漏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31136333/