Dep leak for property keys #11979
Labels
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
scope: reactivity
Vue version
3.5.6
Link to minimal reproduction
https://play.vuejs.org/#eNp9UslqwzAQ/ZVBlzoQHEqXQ3FLF3JoC2lpQk+C4irjxLEsGS1OivG/dySTNIeSm/SWmTcjdeyhadLWI7thmRWmbBxYdL6546qsG20cdGAwF65scUynAnoojK7hjExnXHElZG4tfC5MLiro+ghpZakO3B6sicItzNElo9GeriJdJARwVXhFOq2AdK/4k4yg4wqgSttceiRl8A89goG6ZJMhLgWli8O6kblDugFk6/O7rgObrnObVCPo+2xCUKS+vXPU5l7IUlS3nA39OIsswAy3UTYZdIRmk6PabMycpfhFuUo3VivaWszJmdB1U0o0b00Yw3J2M0wQuFxKvX2JmDMex3tcrFFU/+AbuwsYZ+8GLZoWOTtwLjcrdAM9nc9wR+cDWeull6Q+QX6g1dKHjIPs0aslxT7SxbTP8e1LtVrY6c6hsvuhQtCg7KOeM/oFTydG/4t7kV5GHz0ebfGrRRNq0gIv0qv0mvW/8H3XZg==
Steps to reproduce
New
button a few times.VTrack
.What is expected?
There should be only one instance of
VTrack
.What is actually happening?
There is one instance per button click.
System Info
No response
Any additional comments?
Dep
class, as instances of that also leak.The
Set
isn't required to reproduce the problem, it just makes it much easier to see. This example uses a normal object:In this case there is no
VTrack
, so you need to filter forDep
to see the problem. A newDep
gets created for each button click, but they never get tidied up. TheSet
case is much worse asset.has(key)
also leakskey
, which could potentially be a large object.The text was updated successfully, but these errors were encountered: