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

[vue] vue组件里写的原生addEventListeners监听事件,要手动去销毁吗?为什么? #447

Open
haizhilin2013 opened this issue Jun 22, 2019 · 2 comments
Labels
vue vue

Comments

@haizhilin2013
Copy link
Collaborator

[vue] vue组件里写的原生addEventListeners监听事件,要手动去销毁吗?为什么?

@haizhilin2013 haizhilin2013 added the vue vue label Jun 22, 2019
@forever-z-133
Copy link

肯定要,一方面是绑定多次,另一方面是函数没释放会内存溢出

@daiwanxing
Copy link

需要,原生DOM事件必须要手动销毁,否则会造成内存泄漏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vue vue
Projects
None yet
Development

No branches or pull requests

3 participants