v-once and "unmount callbacks", possible memory leak? #5154
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
🐞 bug
Something isn't working
Version
3.2.26
Reproduction link
codesandbox.io
Steps to reproduce
What is expected?
Console statements saying that the "OtherCmponent" is unmounted/destroyed are shown along with the "mounted" statements.
What is actually happening?
Only the mount statements are shown
This was behaving differently in vue2, as the "destroy callbacks" were called, see: https://codesandbox.io/s/lingering-water-j7g43
This might also be related to this external issue: intlify/vue-i18n#844 (I think I can see evidence of something similar with vue-router) and generally, it might introduce memory leaks when using Components that were not specifically written to account for the beforeUnmount/unmounted not being called.
Please do let me know if this is not an issue but just a documentation miss (is it specified somewhere or should it be?), or if this is just my misunderstanding.
The text was updated successfully, but these errors were encountered: