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

i18n reference to root causes memory leak #1044

Closed
lzxb opened this issue Nov 10, 2020 · 3 comments
Closed

i18n reference to root causes memory leak #1044

lzxb opened this issue Nov 10, 2020 · 3 comments
Labels
help wanted Extra attention is needed Status: PR Welcome Welcome to Pull Request Type: Bug Bug or Bug fixes

Comments

@lzxb
Copy link
Contributor

lzxb commented Nov 10, 2020

vue & vue-i18n version

ex: 2.6.12, 8.22.1

Reproduction Link

Steps to reproduce

image

What is Expected?

i18n.$root in root beforeDestroy hook remove it.
image

What is actually happening?

image

When the root instance is destroyed, the i18n object also keeps a reference to the root, which makes it impossible to be recycled by memory

@lzxb
Copy link
Contributor Author

lzxb commented Nov 10, 2020

The existing architecture will lead to cross reference when multiple Vue root instances are used

@kazupon kazupon added help wanted Extra attention is needed Status: PR Welcome Welcome to Pull Request Type: Bug Bug or Bug fixes labels Nov 21, 2020
@kazupon
Copy link
Owner

kazupon commented Nov 21, 2020

Thank you for your reporting!
good catch!
welcome contribution!

@kazupon
Copy link
Owner

kazupon commented Mar 23, 2021

close (release v8.24.2)
https://github.com/kazupon/vue-i18n/releases/tag/v8.24.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Status: PR Welcome Welcome to Pull Request Type: Bug Bug or Bug fixes
Projects
None yet
Development

No branches or pull requests

2 participants