Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollectionView Header and Footer leak memory on iOS #22910

Closed
EGoverde opened this issue Jun 7, 2024 · 3 comments
Closed

CollectionView Header and Footer leak memory on iOS #22910

EGoverde opened this issue Jun 7, 2024 · 3 comments
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

Comments

@EGoverde
Copy link

EGoverde commented Jun 7, 2024

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

  1. Create a Page with a CollectionView in XAML.
  2. Define a CollectionView.Header or CollectionView.Footer with any XAML (like a Label).
  3. Navigate to and then away from the Page.
  4. The content inside the Header or Footer does not get finalized.

<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

@EGoverde EGoverde added the t/bug Something isn't working label Jun 7, 2024
Copy link
Contributor

github-actions bot commented Jun 7, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@PureWeen PureWeen added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Jun 8, 2024
@RoiChen001 RoiChen001 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert labels Jun 13, 2024
@RoiChen001
Copy link

Can repro this issue at iOS platform on the latest 17.11.0 Preview 2.0(8.0.60-ci.net8.24304.1&8.0.60-ci.net8.24303.1).
Leak

@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jun 13, 2024
@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
@samhouts samhouts added the memory-leak 💦 Memory usage grows / objects live forever (sub: perf) label Jul 18, 2024
@PureWeen PureWeen added the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Dec 4, 2024
Copy link
Contributor

Hi @EGoverde. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@dotnet-policy-service dotnet-policy-service bot removed this from the Backlog milestone Dec 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

5 participants