When updating ItemsSource for ListView cell views remains in memory both on Android(not so fast) and UWP(rapidly)
Cell Views GC
Cells grow in memory
Sample Project:
ListViewMemory.zip
Allocation here. The debugger knows the source file and line for the frame's before the ctor but for some reason consider the symbols unloaded... So could also be a tooling issue. I'm in VS 2019.

I think UWP memory leaks with the Cells is related to this
https://github.com/xamarin/Xamarin.Forms/issues/5465
From what I can say some Cells never get Parent reset(after profiling my real app) and because they have a listener to Parent PropertyChanged (height) they keep everything(on Android) on UWP things even worse. Maybe use weak property listener in Cell to listen for Parent.PropertyChange will help (but this maybe workaround for a situation when Parent is not reset in the first place).
`protected override void OnParentSet()
{
if (RealParent != null)
{
RealParent.PropertyChanged += OnParentPropertyChanged;
RealParent.PropertyChanging += OnParentPropertyChanging;
}
base.OnParentSet();
PropertyPropagationController.PropagatePropertyChanged(null);
}`
This issue is a problem for me as well. I would be delighted if it is fixed.
Is that still the case for collectionview? I use sflistview and it doesn't have this problem.
Most helpful comment
This issue is a problem for me as well. I would be delighted if it is fixed.