the Collection view leaks under iOS when binding to an ObservableCollection
the above steps work fine when running this on android
on iOS the collectionview leaks, the way to isolate that is to disable the collection view. Comment out the following lines in the ScrollViewX class and the memleak check will not report any leaks:
line 35: stackLayout.Children.Add(DaCollectionView);
line 81: set.Bind(DaCollectionView).For(v => v.ItemsSource).To(vm => vm.ColMonkeys).OneWay();
line 82: set.Bind(DaCollectionView).For("ItemClick").To(vm => vm.MonkeySelectedCommand);
https://github.com/hulluP/CollectionViewMemLeak
@hulluP I tried to git clone
your repo and build your app, but the iOS build is throwing errors.
HI @hartez
Sorry I did a local change to test which was not supposed to be pushed. I cleaned up the repo it does work again.
HP
+1 to this issue. We're seeing the same thing in our iOS app.
In trying to find a workaround, I've discovered the following:
Hope this helps.
cheers,
Mike
I've got stacks of Problems with CollectionView on iOS, should I just use some other Collection Scrolling View at this point? Following multiple of these bugs that have been open 6 months +
@Kylar182 - due to the iOS memory issues, we've avoided CollectionView completely and stayed with ListView in our app. Probably not ideal if you need some of the CollectionView UI improvements though.
@michaelb-yambay This is my first Xamarin App and Everyone said use CollectionView as it's the new Microsoft Recommendation. I know some of the problems are native to iOS's CollectionView itself so you can't fully Blame Xamarin but you'd think they'd implement work arounds after a year.
Got the same problem here, can't use collectionview without big leaks of memory.
Most helpful comment
+1 to this issue. We're seeing the same thing in our iOS app.
In trying to find a workaround, I've discovered the following:
Hope this helps.
cheers,
Mike