Anyone ever tried A Xamarin.Forms Listview with an ItemTemplate containing a Image view? Now, what happens when ListView contains ca 20 or more rows?
As for me, I h
Another set of steps that may help is the following:
There appears to be a memory leak on android involving listviews with custom cells. I did some investigating and found that if I did the following in my pages:
protected override void OnAppearing()
{
BindingContext = controller.Model;
base.OnAppearing();
}
protected override void OnDisappearing()
{
BindingContext = null;
Content = null;
base.OnDisappearing();
GC.Collect();
}
Set the android option in the manifest to use a large Heap (android:largeHeap="true") , and lastly, used the new Garbage collector, (in the environment.txt, MONO_GC_PARAMS=bridge-implementation=new) This combination of things, seems to fix the crashing issue. I can only assume that this is just because the setting of things to null, helps the GC to dispose of the elements, the large heap size to buy the GC time to do so, and the new GC option to help accelerate the collection itself. I sincerely hope this helps someone else...