adonis-ui icon indicating copy to clipboard operation
adonis-ui copied to clipboard

RippleHost causing MemoryLeaks

Open Zordiac opened this issue 3 years ago • 3 comments
trafficstars

Describe the bug The RippleHost Eventhandlers do not get properly removed, causing references to already deleted objects to persist forever, and not being garbage collected.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Adonis Window
  2. Add a ListView, add a Button as ListView.ItemTemplate (to have the ripple effect)
  3. Bind the List to an ObservableCollection with any Object
  4. Add a new Item to the List, and then remove it => Item stays in memory forever and is never garbage collected

Expected behavior Proper removal of all eventhandlers to allowed already removed objects to be garbage collected

*Additional Info Inspected using .net Memory Profiler

Zordiac avatar Mar 14 '22 11:03 Zordiac

WpfApp2.zip

I created a sample app that reproduces that issue, just start it and wait, the memory will get more and more every second, even though the number of items displayed stays the same

Zordiac avatar Mar 14 '22 11:03 Zordiac