-
Notifications
You must be signed in to change notification settings - Fork 77
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
potential memory leak #1717
Comments
Can you give us more insights into your observations, I tested your snippet and did some memory checks: Looks like the GC cleans up the heap. Dropdown Controller: ix/packages/core/src/components/dropdown/dropdown-controller.ts Lines 57 to 59 in 699958d
ix/packages/core/src/components/dropdown/dropdown-controller.ts Lines 204 to 207 in 699958d
Also checked the browser instance there is event after some add/remove element still only one event-listener registered. So any further details would be helpful to solve the issue as fast as possible. |
can you repeat your check using the
No component holding a reference its just the singleton from the controller itself. As a alternative you can try to update (overwrite) |
mmm, I tried it on the react stackblitz for ix-drawer and seems like issue is there as well. |
Can you try to update to one of these version: Core library:
Angular:
React:
Vue:
|
I've tested using stackblitz for react and core (with loaders). In both cases the issue still occurs. |
Prerequisites
What happened?
During the investigation in our application, we've noticed that some of your components might be causing memory leaks.
First, removing the
ix-drawer
reduced the heap size in our application. When we use the component, it stays retained.Second, we've noticed that the dropdown-controller and components that utilize it (date-input and tree) might also suffer from not removed event listeners and cause memory leaks (events are listened to in this function).
In both cases, it is related to the fact that event listeners are not removed - either because there is no code for it at all or it is not reached before the component is removed from the DOM tree.
Please take a look at those components but also other places where the clean up might not be done properly.
I provide a code snippet based on a stackblitz from the docs of one of your components to test the issue a bit. You can add/remove components and observe the memory consumption by taking heap snapshots or turning on the memory monitor in Chrome DevTools.
What type of frontend framework are you seeing the problem on?
Others, JavaScript
Which version of iX do you use?
v2.7.0
Code to produce this issue.
The text was updated successfully, but these errors were encountered: