EditText内存泄漏

时间:2016-03-03 18:32:33

标签: android memory-leaks leakcanary

我正在使用Android 6.0。使用以下布局LeakCanary发现内存泄漏:

Warning: Invalid argument supplied for foreach() in /usr/share/nginx/html/wordpress4/wp-content/plugins/advanced-custom-fields-pro/pro/fields/repeater.php on line 255
Warning: Invalid argument supplied for foreach() in /usr/share/nginx/html/wordpress4/wp-content/plugins/advanced-custom-fields-pro/pro/fields/repeater.php on line 320

没有 <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentTop="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" android:src="@drawable/background"/> <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/edittext" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Simple hint" android:inputType="number|textNoSuggestions" android:singleLine="true" android:textSize="@dimen/title_text"/> </android.support.design.widget.TextInputLayout> </LinearLayout> </android.support.v4.widget.NestedScrollView> 内存泄漏消失了。这是LeakCanary日志:

EditText

有人有同样的问题吗?如何解决?

1 个答案:

答案 0 :(得分:0)

如果泄漏是正确的,那么它会在库中泄漏,这是Google必须在支持库中修复的内容。