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

Memory leak: event listeners aren't removed (?) #175

Open
johanrd opened this issue Oct 13, 2024 · 2 comments
Open

Memory leak: event listeners aren't removed (?) #175

johanrd opened this issue Oct 13, 2024 · 2 comments

Comments

@johanrd
Copy link
Contributor

johanrd commented Oct 13, 2024

  1. Go back and forth to a route with an element using the menu modifier, and take a heap snapshot between each time.
  2. See that for every time, a new instance of Menu and MenuNavgation is retained (accumulating) in memory
Screenshot 2024-10-13 at 23 43 14

Most probable cause seems to be that added event listeners in control aren't removed on component teardown.

@gossi
Copy link
Member

gossi commented Oct 15, 2024

Good catch. I was hoping to remove all references so JS GC can do its job. Apparently it's not the case.

Thanks for doing the investigation 👍

@gossi
Copy link
Member

gossi commented Dec 7, 2024

I had some dispose functionality already lying around. I did a quite cheap implementation in #269 - I didn't profile though. It is more to get it chained up, though it may have an effect already.

Released in 0.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants