-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Memory leak #12370
Comments
I'm not sure this is a memory leak. If I set the Playground to PROD mode, the I believe the reason they're being retained is due to the proxying used to expose variables to the template in dev. In production mode, the variable But perhaps using production mode is 'cheating', in the sense that I'm bypassing what the reproduction was trying to show. Perhaps the intention was just to illustrate that stopping an But I'm not sure whether that is necessarily a problem either. If I might use an analogy, when a component instance is unmounted we do a certain amount of teardown, but we don't teardown everything. A lot of the internals are left intact and it's down to the garbage collector to free up that memory. If someone retains an external reference to the component instance then those internals will still show in a memory dump, but it isn't really a leak. I think what's happening here is essentially the same thing. The It isn't immediately clear to me whether |
Like @skirtles-code pointed out, I don't think this technically qualifies as a leak. But considering standalone usage of |
Vue version
3.5.12
Link to minimal reproduction
https://play.vuejs.org/#eNp9UkFuwjAQ/MrKlzpSFEDtCQESRUhtD21Vqp58icIGQh3bsh2gQvl71w6hHCpySOKZ2fHs2ic2NybbN8jGbOIKWxkPDn1jZkJVtdHWwwkslikccl9sU8CyxMKvCm0QWiitruGOyu+EEqqQuXPwtYifE7QR08qRZdRPr6t5EuhIZLZRnCcwncFJKICuRlb0mobN+dza/IePhsNhkpWVlDzJ6tzwc43Cw3lTntATbHsP57Uhj5idB8MUzvtAS0KAwSBqQpgA9IF6bDLoZkLToIXH2sjcI60AJtvR7Aml1HDQVq4nA1qHgouIpcyTmyqrTbZzWtGEY3eCFbo2lUT7ZnxFMQUbd30HLifHw0vEvG0w7fFii8X3P/jOHQMm2LtFh3aPgl04n9sN+o5erl7xSP8XstbrRpL6BvmBTssmZOxkj41aU+wrXUz7HO9JpTafbnn0qFzfVAgalG3UC0b3ZHGj9b+499lDrKNDYe0vcNPd8w==
Steps to reproduce
Start chrome
Open the linked SFC Playground
Open devtools > Memory
Invoke garbage collection (click on trash)
Create snapshot
In the created snapshot, filter for VClass objects
What is expected?
list
should be garbage collectedWhat is actually happening?
list
should be garbage collectedSystem Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: