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报告,当teleport组件的prop disabled为true时,会发生内存泄漏 #8492

Closed
SZDM opened this issue Jun 4, 2023 · 1 comment
Closed

Comments

@SZDM
Copy link

SZDM commented Jun 4, 2023

Vue version

3.3.4

Link to minimal reproduction

https://play.vuejs.org/#eNp9Uktu2zAQvQrBjR3AIhfpypANF7lCu+NGlsaxGvEDfhQUhoAWKFB031WP0EW7CxDkOvneIkNJThTFyYKCyHkzb97M29GPxrA6AJ3T1OW2NJ448MEshSKklEZbT3ZkOyMWNqQhG6slmSB+MoifBOe1PNF4U6B8D2J89B5p2rR4cq0cUm31+Th7Eamm3gY4egYGJXVog9MjsliSXQyRQ/mszqoACNxklYMIa4RKeacNVeHFgzRV5qHVmBZlTeqk3CwEPVBO0BaFuE9QQSvXa4SudfFVUFKULltXUPQghI3yl+l4DPt6fF+wa4NjH93fOnivFVnlVZmfIVWv/amTh9/fbv9/H/fZ1uhSEZfyJ5F0Rrs9JTIz7IvTCnfdzk/0ASfofD9RQXFL8S7o1nvj5pwHZc5OWa4lX2GMW+yllJAUWq6O2TH7gJ07P3xm4GSytvrcgUVCQWeD2hwfa7CJBVWABfsu1wg75BuFXnH2m29Q/gEfvm93rT53M4filefjGcSnL/wYzaorYJU+nU7Gxh5kTVprN/h905nCR2f2K7//+ffm35/ry193Vz+ury6GhhluunkExWRZwg==

Steps to reproduce

当CustomComponent嵌套在Teleport中,并且Teleport的prop disabled为true时,当我单击“销毁CustomComponent”的按钮后,CustomComponent组件中的onUnmounted生命周期不触发,造成内存泄漏

What is expected?

CustomComponent组件中的onUnmounted生命周期应该触发

What is actually happening?

查看源码后,发现可能是!isTeleportDisabled(props)判断导致的,如下图
微信截图_20230604115912

System Info

No response

Any additional comments?

No response

@baiwusanyu-c
Copy link
Member

duplicate question #6347

@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants