Skip to content

Memory Leak in ListView Control for .NET MAUI #30094

@RiyashameedM

Description

@RiyashameedM

Description

I've encountered a memory leak issue while working with the ListView control in .NET MAUI. To demonstrate the problem, I've created a video recording which shows the memory usage when navigating away from a page containing the ListView.

Even after navigating away from the ListView page, instances of MyModel continue to exist in memory. I've verified this using profiling tools, which show that they are not being garbage collected as expected.

Steps to Reproduce

1.Run the sample .
2.tap on Navigate Button.
3.And navigate back to the previous.
4.Check the reviewInfo model class using profiler

Link to public reproduction project repository

https://github.com/RiyashameedM/MemoryLeak

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-listviewListView and TableViewperf/memory-leak 💦Memory usage grows / objects live forever (sub: perf)platform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions