You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that vue component memory leaks can cause its parent components to leak. Is this caused by the use of $parent and $children links between parent and child components?
My demo is like this, a child component, a parent component, the child component contains some code that will cause a memory leak, the parent component only contains the child component, I found that the parent component will not be garbage collected.
I looked at the source code and found that when the component is destroyed, only the $children property of the component will be cleared and the $parent will not be cleared. Is it because of this reason that the parent component leaks?
In my scenario, I want to locate which component has a memory leak by finding those components that are destroyed but not garbage collected. However, due to the above problems, a large number of components leak, so it is impossible to accurately locate the generated memory leaking components.
So why not Vue break this link when destroying components to minimize the impact of leaks?
What does the proposed API look like?
setUnlinkComponent
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
I found that vue component memory leaks can cause its parent components to leak. Is this caused by the use of $parent and $children links between parent and child components?
My demo is like this, a child component, a parent component, the child component contains some code that will cause a memory leak, the parent component only contains the child component, I found that the parent component will not be garbage collected.
I looked at the source code and found that when the component is destroyed, only the $children property of the component will be cleared and the $parent will not be cleared. Is it because of this reason that the parent component leaks?
In my scenario, I want to locate which component has a memory leak by finding those components that are destroyed but not garbage collected. However, due to the above problems, a large number of components leak, so it is impossible to accurately locate the generated memory leaking components.
So why not Vue break this link when destroying components to minimize the impact of leaks?
What does the proposed API look like?
setUnlinkComponent
The text was updated successfully, but these errors were encountered: