-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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, all event listeners not are automatically removed, and the browser leaves in the heap vue listeners #12445
Comments
I think it maybe the fix has been merged but it hasn't been released yet. |
@caozhong1996 Thank you 🙂. You are well versed in the issue of vue, can you tell me when the patch with fix will be released?
|
Honestly, I don't know, it depends on @yyx990803 |
Fixed but not released yet. |
@posva when can we expect the release? |
@posva any ETA for this one? |
Can 2.6.15 be published for this issue with the below fix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.6.14
Browser
Version 97.0.4692.99 (Official Build) (64-bit) (Ubuntu)
Reproduction link
github.com
Steps to reproduce
id='app'
.Screenshot for steps:
1 step
2 step
And we see heap not cleared from Vue components.
But if we remove
@click="myMetd"
from line 5. and uncomment the code on line 30 in which we ourselves add a click event on the button element, and on line 33 we remove this event listening, then we see that the memory in the browser has really cleared :) .Screenshot with cleaned heap:
I also checked memory leaks for prod builds:
Screenshot of prod build result with Vue event @click heap size 4.6mb:
Screenshot of prod build result without Vue event @click but have addEventListener and removeEventListener heap size 1.8mb :
What is expected?
VueComponents not exist in heap after destroy App.vue(this happens after manual removeEventListener)
What is actually happening?
VueComponents exist in heap after destroy App.vue (see memory heap size)
I saw a similar issue #5187 but the browser still doesn't remove the vue handlers.
Also in the documentation for 2.x vue, https://vuejs.org/v2/guide/events.html#Why-Listeners-in-HTML, the third point about the fact that vue does not remove event listeners is still faulty.
The text was updated successfully, but these errors were encountered: