Skip to content

Memory leak when updating component state #7408

@alexnivanov

Description

@alexnivanov

Vue version

3.2.45

Link to minimal reproduction

https://sfc.vuejs.org/#eNp9kEFPwzAMhf+KFSGtFVvKrlU3CYkLd445rHQedKJJ5LjlEOW/47SAKiZxi5+fv9gvqkfv9TSiqlUTOuo9Q0Ae/dHYfvCOGCJh23E/YYILuQE24t4Ya2znbBA3t4xwgB9XEc8ttzXElMrsGr3U+CRa8TALl9GK0VlYdTo3Wi4hGgsLUGeIUGNgquH0zEjtPHQXZ286pcwSN/JLP6AbuShKOBxvqHAP+3IL+/y5zDTVcqXcJwXj4D/ELhVAc+6nY4yrBbT8Dik1Ve7k2V+/2qolnt3Qen0NzkqA8/rmuxGMkhCykjXJLNdGvTP7UFdVuHQ59mvQjt4qeWmSZeUSjWHYvZL7DEgCNmq7YlQiTkg7QntGQvqP+cd6w81YCSSp9AVUw7au

Steps to reproduce

Make some component with reactive {data: {...}} state object, setup constant updates of data object.

What is expected?

Memory usage is constant (old objects should be cleaned by GC).

What is actually happening?

Memory usage grows and never stops.

System Info

OS: macOS Ventura 13.0.1
Browser: Chrome build 108.0.5359.124 (Official Build) (arm64)

Any additional comments?

In my original app I had updates by websocket, but it is easy to reproduce locally as well (see SFC example).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions