You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Event listeners for 'toastChanged' and 'remove' are not removed before toast is destroyed, so references to the toast stay in the heap. This leads to serious memory leaks with content-heavy toasts.
Reproduction
Initialize vue-cli-project, add snotify. Make a heap snapshot, perform a garbage collection, open 30 timed out toasts, perform a garbage collection, make second snapshot. Memory usage increases significantly due to not removed listeners.
Description
Event listeners for 'toastChanged' and 'remove' are not removed before toast is destroyed, so references to the toast stay in the heap. This leads to serious memory leaks with content-heavy toasts.
Reproduction
Initialize vue-cli-project, add snotify. Make a heap snapshot, perform a garbage collection, open 30 timed out toasts, perform a garbage collection, make second snapshot. Memory usage increases significantly due to not removed listeners.
https://codesandbox.io/s/vue-template-46g5e
We added a footprint property to the toast constructor to make the memory leak more visible.
Solution
Remove event listeners before destroying toast.
The text was updated successfully, but these errors were encountered: