-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
Vue version
3.4.29
Link to minimal reproduction
Steps to reproduce
Click the toggle button a few times.
What is expected?
There is a div with an @click event listener, and my expectation is that the event listener should be added when the div is mounted to the DOM and removed when the div is unmounted.
What is actually happening?
The console shows that the event listener gets added, but never that it gets removed. Performance recordings show that the amount of listeners keeps increasing, never decreasing.

System Info
System:
OS: Windows 11 10.0.22631
CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12400F
Memory: 3.23 GB / 15.79 GB
Binaries:
Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (126.0.2592.87)
Internet Explorer: 11.0.22621.3527
npmPackages:
vue: ^3.4.29 => 3.4.31Any additional comments?
Using vue in the building of an online game where elements with click/mouseenter/mouseleave events often are added/removed from the DOM, and noticed significant memory leaks with ever-increasing listener amounts.
Thanks in advance for any help!
Metadata
Metadata
Assignees
Labels
No labels