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
This discussion was converted from issue #2408 on November 22, 2024 13:29.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
从非根组件的路由跳转到根组件,有内存泄漏问题
Steps to reproduce the bug
在首面,通过路由跳转到table box组件,再从table box组件通过路由跳转到首页,手动进行垃圾回收,DOM Nodes并没有减少,说明存在内存泄漏问题。如下图演示:




路由跳转到table box组件:
在table box组件跳转到首页:
手动垃圾回收,DOM Nodes并没有减少
但是,在table box组件,点击首页的路由Go to home,则不会有内存泄漏


跳转后:
路由配置:




App.vue:
RouterNav.vue:
table box组件:
Expected behavior
从首页路由跳转到table box组件,再从table box组件通过路由跳转到首页,table box组件销毁,DOM Nodes应该下降
Actual behavior
从首页路由跳转到table box组件,再从table box组件通过路由跳转到首页,table box组件销毁,DOM Nodes没有下降,说明有内存泄漏风险
Additional information
"vue": "^3.4.29",
"vue-router": "^4.4.5"
Beta Was this translation helpful? Give feedback.
All reactions