Xamarin.Forms
Xamarin.Forms copied to clipboard
[Bug] Memory Leak in CollectionView ?
Hello Team,
I am new to xamarin. We are using Xamarin application with ReactiveUI implementation. Screen: We have simple screen with button to show/hide the CollectionView and API call to bind the data to CollectionView.
Where ever I scroll the CollectionView or click on show/hide button. More memory is consumed by app.
So After using in for 2 hours or more it will be start giving ANR on android.
I am using Xamarin Profiler to check what's going on under the hood.
What I noticed is that there are 800 students returns from the server. But on profiler I see 5000+ FileImageSource I see 5000+ Dictionary<Xamarin.Forms.BindableProperty, Xamarin.Forms.BindableObject.BindablePropertyContex> I see 5000+ System.Func<System.Reactive.Unit> I see 5000+ Xamarin.Forms.WeakEventManager.Subcription[] and Many more......
And this object get increased as I scroll or click on show/hide button.
DynamicDataExample.zip Sample App
Try .NET MAUI in .NET 8