Skip to content

Memory leaks when using transition-group #13181

Closed
@alexeyvokin

Description

@alexeyvokin

Vue version

3.5.13

Link to minimal reproduction

https://play.vuejs.org/#eNqNUk1v2zAM/SusLrWB1M6Q7dI5wbqhwLbDNmw7Cghch3bVyJIgyU6CwP+9lNwkBfppwLbIRz4+UtyzK2OyvkN2yQpXWWE8OPSdWXAlWqOthz1YrGGA2uoWzin0/PMR+6Zb8wBkeTACVcC5qrRyxHWrNwrmgSKpS+kwJbDIx0pUgwyPrZGlR7IAipvOe63gSyVFtZ5zdiA4iwfOFl43jUTohRM3Qgq/K/IxJ7IRg7elcsILrS4aq2MnQE8RtfYXoj6wcgb5WDR/JoecJ2FswryjjmrRZHdOK5rWPmRyVhGrkGh/m5DtOLuEiASslFJvfkaftx1ODv7qFqv1M/47tw0+zv5YdGh75OyI+dI26Ef4+t8v3NL5CLZ61UmKfgX8i07LLmgcw752akWyH8VFtT/ivQrV/HfXW480lIemgtAQOcR4zuiew0Bfav0kd5Z9jHlcDTTFw468c91iHc5O++SRPuM6KdzAlbXlLplNl9NpfNOsFlIm9G9LkyTLCYgU5gtI9iBgSNO3tm8l+sV3pEFMoMVW2x1ILNdnRR6Apzux7NGGCVE3s+xT9mHGhnsA0RtH

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.

Image Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ❗ p4-importantPriority 4: this fixes bugs that violate documented behavior, or significantly improves perf.scope: transition

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions