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

Vue父子组件间数据传递在IE浏览器中内存泄漏 #9284

Open
MR-fisher opened this Issue Jan 8, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@MR-fisher
Copy link

MR-fisher commented Jan 8, 2019

Version

2.5.21

Reproduction link

https://github.com/MR-fisher/vue-memory-leak-case

Steps to reproduce

通过连接下载案例demo,并运行 npm install 安装,完成后运行 npm start 启动工程,通过浏览器输入 http://localhost:8080/ 访问问题页面,交叉重复点击 xx 和 yy 按钮,组件x和y因为条件渲染控制会重复创建和销毁,看到任务管理器中ie浏览器占用内存不断飙升。

What is expected?

ie浏览器内存回收正常

What is actually happening?

ie浏览器内存占用不断飙升


该问题在ie edge浏览器下可以重现,chrome下是正常的
怀疑是条件渲染切换不同子组件展示时,每次切换会导致当前子组件被销毁,但是对应传入的prop并未销毁,组件的DOM与prop对象存在引用联系,尽管组件已销毁,但是引用关系仍然存在内存中,导致内存泄漏。

MR-fisher added a commit to MR-fisher/vue that referenced this issue Jan 17, 2019

MR-fisher added a commit to MR-fisher/vue that referenced this issue Jan 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment