CollectionView Header and Footer leak memory on iOS #22910
Labels
area-controls-collectionview
CollectionView, CarouselView, IndicatorView
memory-leak 💦
Memory usage grows / objects live forever (sub: perf)
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
platform/iOS 🍎
s/triaged
Issue has been reviewed
s/try-latest-version
Please try to reproduce the potential issue on the latest public version
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Description
Content placed in a CollectionView.Header or CollectionView.Footer does not get garbage collected on iOS. This is not happening on Android or WinUI. Tested using nightly '8.0.60-ci.net8.24304.1'.
The non-nightly version MAUI 8 has more memory-related issues with CollectionView that have been partially resolved in the nightly (see #20710), but this one still remains.
I created a demo project using MemoryToolkit.Maui.
Steps to Reproduce
<CollectionView ItemSource=".."> <CollectionView.Header> <Label Text="Leaking Component"/> </CollectionView.Header/> </CollectionView>
Link to public reproduction project repository
https://github.com/EGoverde/MemoryLeaks
Version with bug
Nightly / CI build (Please specify exact version)
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: