Skip to content

Commit 2632249

Browse files
committed
fix(keep-alive): fix keep-alive memory leak
close #12827
1 parent 3650c12 commit 2632249

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/vdom/create-component.ts

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ const componentVNodeHooks = {
6262
vnode, // new parent vnode
6363
options.children // new children
6464
)
65+
// #12187 unset children reference after use to avoid memory leak
66+
options.children = undefined
6567
},
6668

6769
insert(vnode: MountedComponentVNode) {

0 commit comments

Comments
 (0)