Skip to content
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

KeepAlive include remove deactive component should remove the component from keep-alive storageContainer #5258

Closed
meteor199 opened this issue Jan 14, 2022 · 0 comments · Fixed by #5260
Labels
🐞 bug Something isn't working scope: keep-alive

Comments

@meteor199
Copy link

Version

3.2.26

Reproduction link

sfc.vuejs.org/

Steps to reproduce

  1. click show comp2 button to show comp2
  2. click remove keep-alive comp1 button to remove comp1 from keep-alive include
  3. KeepAlive‘s storageContainer still have comp1.element

中文:

  1. 点击' show comp2 '按钮显示组件' comp2 '
  2. 点击' remove keep-alive comp1 '按钮从keep-alive include中移除' comp1 '
  3. KeepAlive的storageContainer还存在comp1的element

What is expected?

storage container remove comp1.element

What is actually happening?

storage container still have comp1.element


一个组件 deactivated 后 ,将其从 KeepAlive的include 中删除,KeepAlive的storageContainer不会删除此组件的element,导致此组件无法回收,造成内存泄漏。

When a component is deactivated, delete it from the KeepAlive include too. But the KeepAlive storageContainer still contains a element of the component, which causes memory leak.

@edison1105 edison1105 added scope: keep-alive 🐞 bug Something isn't working labels Jan 14, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: keep-alive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants