Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18d1255e authored by Romain Guy's avatar Romain Guy
Browse files

Prevents memory leaks by correctly detaching views in AbsListView.

AbsListView can reject views from the recycler's scrap heap but when that
happens the rejected view is not detached from the parent. This can be pretty
bad in the case of TextView since it prevents them from unregistering their
OnPreDrawListeners.
parent 7f86d58f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3560,6 +3560,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            // into the scrap heap
            int viewType = lp.viewType;
            if (!shouldRecycleViewType(viewType)) {
                removeDetachedView(scrap, false);
                return;
            }