Skip to content
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

vue-router positionStore memory leak #3445

Closed
hezedu opened this issue Jan 11, 2021 · 2 comments
Closed

vue-router positionStore memory leak #3445

hezedu opened this issue Jan 11, 2021 · 2 comments

Comments

@hezedu
Copy link

hezedu commented Jan 11, 2021

Version

3.4.9

Reproduction link

https://hezedu.github.io/SomethingBoring/vue-router-positionstore-memory-leak/index.html

Steps to reproduce

I read the source code and found that positionStore has only set, not deleted.

What is expected?

The data in positionStore should be cleared on history.push() or history.replace().

What is actually happening?

The memory haspmap:positionStore will continue to grow.

@hezedu
Copy link
Author

hezedu commented Jan 11, 2021

@posva
Copy link
Member

posva commented Jan 11, 2021

Thank you but this is not a memory leak per se, if you keep navigating and pushing entries into the history, it's normal for it to grow. It would be problematic if it was cleared.

In practice, this will never be a problem because one would need to repeat the action millions of times.

That being said, if you have a reasonable PR proposal to clear them out when unused, I will be very happy to review it

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