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

bug of Vnode memory leak #12081

Closed
weidehai opened this issue May 18, 2021 · 3 comments
Closed

bug of Vnode memory leak #12081

weidehai opened this issue May 18, 2021 · 3 comments

Comments

@weidehai
Copy link

Version

2.6.11

Reproduction link

https://codepen.io/weidehai/pen/mdWradp

Steps to reproduce

使用chrome的内存分析工具,对比隐藏前后的内存

What is expected?

无论是子组件调用隐藏还是父组件调用隐藏都应该回收helloworld组件的vnode

What is actually happening?

只有父组件调用隐藏才回收


如果修改子组件内button的click事件为@click.once,那么无论是子组件调用隐藏还是父组件调用隐藏都会回收helloworld组件的vnode

@weidehai
Copy link
Author

image
image
第一张的点击子组件调用隐藏按钮的内存分析,可以看到vnode没有回收,新加的那个是创建的comment节点
第一张的点击父组件调用隐藏按钮的内存分析,可以看到vnode回收了,新加的那个是创建的comment节点

@Alanscut
Copy link

Alanscut commented Aug 5, 2021

It seems to have been fixed by #10085

@posva
Copy link
Member

posva commented Aug 5, 2021

Thanks @Alanscut

@posva posva closed this as completed Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants