-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
PrimeVue Tooltip: memory leak #5856
Comments
Most likely a duplicate of #5629. |
True, but I provided a reproducible repo. |
The Tooltip component leaks event listeners (click, keydown and mouseleave) on each execution of the updated hook. In bindEvents() of Tooltip.js the event listeners are created like this: Therefore the removal of the event listeners in unbindEvents() using Demo: https://stackblitz.com/edit/zafh9e?file=src%2FApp.vue To be able to remove the event listeners afterwards, it's necessary to store a reference to the handler function like it's done for the mouseenter event: |
Hi, searching for more occurrences of @emp-mas 's finding, the ripple directive has the same issue primevue/packages/primevue/src/ripple/Ripple.js Lines 25 to 30 in 917ef22
This affects a bunch of components, but only if enabled (...so its not the leak I'm looking for) |
Perhaps a |
is there any progress with this issue? |
is there any progress with this issue? |
Describe the bug
The tooltip component causes serious memory leak if the tooltip is attached to a re-rendered component. I created a minimal application to demonstrate the issue. The application was monitored with Chrome task manager. When the application started up the memory usage was this:


After a couple of hours running, JS memory usage increased to 44MB:
Reproducer
https://stackblitz.com/~/github.com/csakis/prime-test?file=vite.config.ts
PrimeVue version
3.52.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome
Steps to reproduce the behavior
Expected behavior
Memory usage should be constant, however, it keeps growing steadily,
The text was updated successfully, but these errors were encountered: