Closed
Description
Vue version
3.5.13
Link to minimal reproduction
Steps to reproduce
Toggle the visibility of the component and observe memory usage increasing. The detached element also remains in memory.
What is expected?
Memory should be cleaned up after the component is hidden. The detached element should be removed from memory as well.
What is actually happening?
Memory consumption increases when toggling component visibility. The number of detached elements also grows.


System Info
System:
OS: macOS 15.1.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 1.21 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
Browsers:
Chrome: 135.0.7049.84
Safari: 18.1.1
Any additional comments?
This seems to be the related issue #12181