Skip to content

Commit e3c6a5f

Browse files
yyx990803ztlevi
authored andcommitted
fix: prevent memory leak due to circular reference in vnodes
fix vuejs#6759
1 parent ae01bec commit e3c6a5f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/instance/lifecycle.js

+4
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ export function lifecycleMixin (Vue: Class<Component>) {
133133
if (vm.$el) {
134134
vm.$el.__vue__ = null
135135
}
136+
// release circular reference (#6759)
137+
if (vm.$vnode) {
138+
vm.$vnode.parent = null
139+
}
136140
}
137141
}
138142

0 commit comments

Comments
 (0)