Skip to content

Object memory leak with keepalive #10888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ChuckFields opened this issue Dec 3, 2019 · 2 comments
Closed

Object memory leak with keepalive #10888

ChuckFields opened this issue Dec 3, 2019 · 2 comments

Comments

@ChuckFields
Copy link

ChuckFields commented Dec 3, 2019

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

@ChuckFields
Copy link
Author

This may be related to this PR: #9962

@posva
Copy link
Member

posva commented Dec 4, 2019

#9962 should fix this.
Note: When reporting memory leaks, please provide boiled down repros (no store no router)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants