`KeepAlive include` remove `deactive component` should remove the component from keep-alive storageContainer
Version
3.2.26
Reproduction link
Steps to reproduce
- click
show comp2
button to showcomp2
- click
remove keep-alive comp1
button to removecomp1
from keep-alive include - KeepAlive‘s storageContainer still have comp1.element
中文:
- 点击' show comp2 '按钮显示组件' comp2 '
- 点击' remove keep-alive comp1 '按钮从keep-alive include中移除' comp1 '
- 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.