Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RippleHost causing MemoryLeaks #185

Open
Zordiac opened this issue Mar 14, 2022 · 3 comments
Open

RippleHost causing MemoryLeaks #185

Zordiac opened this issue Mar 14, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Zordiac
Copy link

Zordiac commented Mar 14, 2022

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 Zordiac added the bug Something isn't working label Mar 14, 2022
@Zordiac
Copy link
Author

Zordiac commented Mar 14, 2022

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

@Drommedhar
Copy link

Just stumbled upon the same issue.
I have a list which I switch out at runtime that can have a lot of UserControls that I use a button on for the Spotlight effect.

I noticed that the memory went up if I switched the lists. Would be nice to get a fix for that.

@Drommedhar
Copy link

For anyone looking for a "fix". This is my App.xaml which includes all default Ressources, but the Button.xaml explicitly without the ripple effect, so no more memory leaks:

App_Fixed.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants