Description
When using CollectionView in .NET MAUI, unmanaged memory usage grows progressively and is not released even after the control is removed from the visual tree or the page is navigated away. This issue occurs in two scenarios:
Page Navigation: Repeatedly navigating to a page containing a CollectionView and then popping back causes unmanaged memory to increase with each iteration.
Same-Page Dynamic Disposal: Dynamically creating and removing a CollectionView on the same page also results in unmanaged memory retention.
Native platform handlers and views remain allocated even after the CollectionView is removed, indicating incomplete disposal of unmanaged resources. Over time, this leads to memory pressure and potential application crashes in long-running apps.
CollectionView.zip
Sample.zip
Without GC:




With GC:
Triggering garbage collection may slightly reduce unmanaged memory usage temporarily. However, the memory usage begins to increase again over time, indicating that native resources are not being fully released.

Steps to Reproduce
- Run attached sample.
- Open the dot memory and open this application.
- The Click Go to Page.
- Click Add CollectionView and then Click Remove CollectionView for 20 to 30 times.
- Then navigate back to main page and take snapshot in dot memory.
Link to public reproduction project repository
No response
Version with bug
9.0.110 SR12
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.
Relevant log output
Description
When using CollectionView in .NET MAUI, unmanaged memory usage grows progressively and is not released even after the control is removed from the visual tree or the page is navigated away. This issue occurs in two scenarios:
Page Navigation: Repeatedly navigating to a page containing a CollectionView and then popping back causes unmanaged memory to increase with each iteration.
Same-Page Dynamic Disposal: Dynamically creating and removing a CollectionView on the same page also results in unmanaged memory retention.
Native platform handlers and views remain allocated even after the CollectionView is removed, indicating incomplete disposal of unmanaged resources. Over time, this leads to memory pressure and potential application crashes in long-running apps.
CollectionView.zip
Sample.zip
Without GC:




With GC:

Triggering garbage collection may slightly reduce unmanaged memory usage temporarily. However, the memory usage begins to increase again over time, indicating that native resources are not being fully released.
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
9.0.110 SR12
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.
Relevant log output