-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Description
Vue version
3.5.12
Link to minimal reproduction
https://github.com/softwareCobbler/formkit-leak-repro/tree/just-vue3
Steps to reproduce
Build via "npm build". Run via some barebones http server, I am using python -m http.server. Click on "toggle" to mount the component in question. Type into the element (mash keyboard, or single character is fine). Note that this does not reproduce if the input element is not typed into. Then click on toggle to unmount the component. Check chrome devtools for memory consumption. See that It retains about 40mb (one "leak" object), which is still reachable after unmount, and forcing a GC does not reclaim it (because it still reachable).
I see that the retainers includes various detached elements and a reference to something named _vei, which looks similar to #5363, so maybe this is a regression. The leaked object's classname is literally Leak to make it stand out in the heap viewer.
What is expected?
After unmount, refs declared in a setup function become candidates for GC.
What is actually happening?
Objects are being retained past their expected lifetime.
System Info
chrome 129Any additional comments?
No response
