Android LeakCanary检测到webview内存泄漏
我在android应用程序中使用了Android LeakCanary检测到webview内存泄漏,android,memory-leaks,webview,leakcanary,Android,Memory Leaks,Webview,Leakcanary,我在android应用程序中使用了LeakCanary,问题如下: 找到解决方案,替换: onCreate: LinearLayout webViewHolderLayout = (LinearLayout)view.findViewById(R.id.webview_linearLayout); newsView = new WebView(getActivity().getApplicationContext()); webViewHolderLayout.addView(newsView
LeakCanary
,问题如下:
找到解决方案,替换:
onCreate:
LinearLayout webViewHolderLayout = (LinearLayout)view.findViewById(R.id.webview_linearLayout);
newsView = new WebView(getActivity().getApplicationContext());
webViewHolderLayout.addView(newsView);
newsView.removeAllViews();
newsView.destroy();
onDestroy:
LinearLayout webViewHolderLayout = (LinearLayout)view.findViewById(R.id.webview_linearLayout);
newsView = new WebView(getActivity().getApplicationContext());
webViewHolderLayout.addView(newsView);
newsView.removeAllViews();
newsView.destroy();
问题仍然存在
帮助!!!看起来像是webview的bug,在棉花糖中修复