Skip to content

Object memory leak with keepalive  #10888

Closed
@ChuckFields

Description

@ChuckFields

Version

2.6.10

Reproduction link

(removed)

Steps to reproduce

Clicking on the about tab will create a javascript object with the class LingeringObject and put it in the store under lingeringObj.
Clicking on the home tab destroys the about component and resets lingeringObj to null.
If you now click the collect garbage button take a heap snapshot with chrome, then type LingeringObject in the Class filter, you'll see the object that was just created, however there are no references to it. If I remove the keepalive, this is no longer an issue. The keepalive has exclude="about" on it.

What is expected?

The LingeringObject to get garbage collected

What is actually happening?

Somehow Vue is holding onto a reference of the LingeringObject


Here is the source code to the reproduction link: https://github.com/ChuckFields/LingeringObject

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