Skip to content

Comments

Fix memory leak in functional components by tearing down render watchers#13307

Open
KashviYadav09 wants to merge 1 commit intovuejs:mainfrom
KashviYadav09:fix-functional-memory-leak
Open

Fix memory leak in functional components by tearing down render watchers#13307
KashviYadav09 wants to merge 1 commit intovuejs:mainfrom
KashviYadav09:fix-functional-memory-leak

Conversation

@KashviYadav09
Copy link

Functional components create render watchers that were not properly cleaned up
on unmount, leading to retained dependencies and memory leaks.

This PR tracks functional watchers at vnode level and ensures teardown during
patch destroy and lifecycle cleanup. Includes a regression test.

Copy link

@mufasacubana8-pixel mufasacubana8-pixel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Response ()

@KashviYadav09
Copy link
Author

KashviYadav09 commented Feb 20, 2026 via email

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

Successfully merging this pull request may close these issues.

2 participants