-
-
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 in Vue.js server-side when using "computed" #5975
Comments
Hi, I have cloned your repository. Wrapping your code in a Note the memory consumption in your snapshot is under 200MB, which is fairly a low work load for server code. So it is reasonable V8 does not reclaim these memory. Can you provide more information? |
Please update your code to illustrate the problem. |
alreay updated |
Ok, I reproduced it. And commenting out throw new Error does keep memory low. |
Reproducible in browser. var timer = setInterval(function() {
const vm = new Vue({
computed: {
"test": function() {
throw 'erro happened';
}
}
});
try {
vm.test
} catch(e) {
}
}, 1); |
watcher.get should always clean up observee stack in order to prevent memory leak. Also, non-user defined watch should rethrow error. vuejs#5975
watcher.get should always clean up observee stack in order to prevent memory leak. Also, non-user defined watch should rethrow error. fix vuejs#5975
Version
vue@2.2.3
Reproduction link
https://github.com/freeozyl80/vue-memory-leak
Steps to reproduce
What is expected?
throw error and pause
What is actually happening?
the vonde is going to run and create, but not destroyed and exit.
In heap snapshots, i found the vue$2 has created almost 4538
just look in 'https://github.com/freeozyl80/vue-memory-leak'
The text was updated successfully, but these errors were encountered: