microsoft / microsoft-ui-xaml

WinUI: a modern UI framework with a rich set of controls and styles to build dynamic and high-performing Windows applications.
MIT License
6.38k stars 683 forks source link

If the ItemsView scrolls the scrollbar, the memory of the item will not be released. #9961

Open lgztx96 opened 2 months ago

lgztx96 commented 2 months ago

Describe the bug

page Snipaste_2024-09-08_23-07-18 item Snipaste_2024-09-08_23-05-23 source code TestApp.zip

Steps to reproduce the bug

https://github.com/user-attachments/assets/e6b99cdf-2b84-4091-ac5d-961673707ccf

Expected behavior

After leaving the page, memory should be freed

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.6.0: 1.6.240829007

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

lgztx96 commented 2 months ago

By the way, if the class inherits from itemsview, it will prompt 'Microsoft.UI.Xaml.dll! 00007FFF170F77C8: 80004002: no such interface supported'

 runtimeclass TableView : Microsoft.UI.Xaml.Controls.ItemsView
 {
     TableView();
 }

https://github.com/user-attachments/assets/8dd29c8c-868a-4d81-ba22-14bffe7fcef2

lgztx96 commented 2 months ago

In these cases, Reference count is always 1 before the program ends. Snipaste_2024-09-09_10-21-24