From 2632249925e632e56f6dfc8fdbcf682c82e4081b Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 7 Dec 2023 16:12:36 +0800 Subject: [PATCH] fix(keep-alive): fix keep-alive memory leak close #12827 --- src/core/vdom/create-component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/vdom/create-component.ts b/src/core/vdom/create-component.ts index 9e48c5752..d3a42eebc 100644 --- a/src/core/vdom/create-component.ts +++ b/src/core/vdom/create-component.ts @@ -62,6 +62,8 @@ const componentVNodeHooks = { vnode, // new parent vnode options.children // new children ) + // #12187 unset children reference after use to avoid memory leak + options.children = undefined }, insert(vnode: MountedComponentVNode) {