-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
It appears that Vue-Router maintains an array of all apps registered to use the $router
in the this.$router.apps
array.
When an app is destroyed, Vue router does not remove the reference to the destroyed app from this array.
Every time a user types into a live example (or the playgroud), teh rendered example app is destroyed and recreated (i.e. live). Or if a user switches pages in the docs, the live examples get destroyed from the previous page. In both these cases, the destroyed app references are not being removed from the $router.apps
array, causing a memory leak.
Upstream issue created at vuejs/vue-router#2639 and PR at vuejs/vue-router#2640
We could temporarily fix the issue by manually removing the app reference from $router.apps
array once the app is destroyed by v-play
(for live docs examples) and in the playground, but this should be the responsibility of Vue-Router to clean up after itself.