Skip to content

Memory leak (detached DOM tree) when Vue class component is used #209

Closed
@bartsidee

Description

@bartsidee

Version

6.1.1

Reproduction link

Memory leak with Vue class component
https://jsfiddle.net/n1tvtwet/3/

Not reproduce-able, with vanilla vue js
https://jsfiddle.net/n1tvtwet/

Steps to reproduce

  1. open attached jsfiddle
  2. open chrome dev tools -> memory tab
  3. select the 'Home' route
  4. make a heap snapshot
  5. select the 'Foo' route
  6. make a heap snapshot
  7. select the last snapshot and use the 'comparison' tab
  8. in the search box enter 'detached'
  9. find the detached tree
  10. if you hover the red HTMLDivElement you will notice it is the dom element of the 'Home' component

What is expected?

we would expect that when we use vue-class-component it would not leak memory

What is actually happening?

detached nodes are found and memory is leaked when vue-class-component is used, while this is not the case when a vanilla vuejs solution is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions