【问题标题】:LeakCanary detected webview memory leaksLeakCanary 检测到 webview 内存泄漏
【发布时间】:2015-12-14 05:04:14
【问题描述】:

我在android应用中使用LeakCanary,问题如下: Check this Image

找到解决办法,替换:

onCreate:

LinearLayout webViewHolderLayout = (LinearLayout)view.findViewById(R.id.webview_linearLayout);
newsView = new WebView(getActivity().getApplicationContext());
webViewHolderLayout.addView(newsView);

onDestroy:

newsView.removeAllViews();
newsView.destroy();

问题依然存在……

求救!!!

【问题讨论】:

    标签: android memory-leaks webview leakcanary


    【解决方案1】:

    看起来像 webview 错误,在 Marshmallow https://github.com/square/leakcanary/issues/92 中修复

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-16
      • 1970-01-01
      • 1970-01-01
      • 2012-01-22
      相关资源
      最近更新 更多