element [Bug Report] Memory leak at el-tooltip cleanup

nr7wwzry  于 4个月前  发布在  其他
关注(0)|答案(3)|浏览(144)

Element UI version

0.1.0

OS/Browsers version

All

Vue version

3.0.0-beta.10

https://github.com/ElemeFE/element/blob/dev/packages/tooltip/src/main.js

Steps to reproduce

Traced a memory leak to this to the code:
https://github.com/ElemeFE/element/blob/dev/packages/tooltip/src/main.js

in the mounted there is a 'focus' event listener registered to lambda. In the destroyed we try to to clean it by referencing 'this.handleFocus' but that is not the function that is bound to the event.

What is Expected?

The component event listener should be cleaned up properly.

What is actually happening?

Event is not cleaned up and we leak memory.

0mkxixxg

0mkxixxg3#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

相关问题