-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
.unmount() memory leak #2907
Comments
Good catch, thanks for the report. PR is already up :) |
Same problem. |
"According to doc"... The migration guide does not state that |
… unmount (close #2907) (#2909) close #2907 Co-authored-by: Thorsten Luenborg <[email protected]>
Hi |
Upcoming 3.0.6 |
I'm having exactly this problem, but in the server side... Once createSSRApp(App, fetchedData) for each request, it 's keeping me in memory the fetchedData. App.js
entry-server.js
entry-client.js
As we can't unmount an app that it isn't mounted, the only solution that I found for the moment is create the createSSRApp once, and in each request overwrite the SSR context. But this is not a real solution, because we can have cross request state pollution... the image is a snapshot after 5 requests: Array @3942577 The five Array objects are equal in each case. Am I doing something wrong ? |
Hi @andoniabedul , How did you figure out that the problem was Vuex? What did you do to solve the issue in that case? Thanks in advance |
Hi @gquinteros93 I solved the problem adding a Sorry for the delay answering I didn't read the notifications. |
I would add that it's quite important that you use the For example, if you are not using |
Version
3.0.4
Reproduction link
http://wagoon.demoeshop.net/test-remove-vue.html
Steps to reproduce
What is expected?
According to doc, .unmount() in VUE3 is replacement for $destroy in vue2 => this method should destroy all app data to avoid memory leaks
Accordigt to 990803, unmounted app is not allegible for new mount(), so there is no need to store anything aboth it in memory (#1287 (comment))
What is actually happening?
App object stays linked from vue_app and cant be collected with garbage collector
Only solution i found is removing the target DIV from DOM
I descrobed all steps in detail on stackoverflow post https://stackoverflow.com/questions/65475604/vue-js-3-unmount-and-memory-leak
The text was updated successfully, but these errors were encountered: