Skip to content

ListView/CollectionView memory leak under Windows #9162

@hbraasch

Description

@hbraasch

Description

A simple repro (see link below) demonstrates a ListView/CollectionView memory leak under Windows.
Each time the ItemSource gets updated with the exact same list, the app memory usage increases.
The repro is a simplification, normally the ListView/CollectionView gets filled through a binding. However the repro still demonstrates the same problem.

See this video for a demonstration:

ListviewMemoryTester.mp4

I'm a VS Community user so do not have access to the Xamarin Profiler to see if the problem also exists in Android and iOS.

Steps to Reproduce

  1. Open the app from the repro in VS: https://github.com/hbraasch/ListViewMemoryTester.git
  2. Set the platform to [Windows] and run
  3. Click on the refresh button in the toolbar, see how the memory usage increases
  4. Click on the [Click to launch [CollectionView] page] button, which launches the page based on a CollectionView
  5. Click on the refresh button in the toolbar, see how the memory usage also increases

Version with bug

6.0.408 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

net6.0-windows10.0.19041.0

Did you find any workaround?

No

Relevant log output

No response

Metadata

Metadata

Labels

area-controls-collectionviewCollectionView, CarouselView, IndicatorViewarea-controls-listviewListView and TableViewfixed-in-7.0.100fixed-in-7.0.101fixed-in-7.0.81Look for this fix in 7.0.81!fixed-in-7.0.92Look for this fix in 7.0.92!fixed-in-8.0.0-preview.1.7762Look for this fix in 8.0.0-preview.1.7762!p/1Work that is important, and has been scheduled for release in this or an upcoming sprintperf/generalThe issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)platform/windowst/bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions