We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4733408 commit 07a3726Copy full SHA for 07a3726
src/core/instance/lifecycle.js
@@ -65,6 +65,9 @@ export function lifecycleMixin (Vue: Class<Component>) {
65
vm.$options._parentElm,
66
vm.$options._refElm
67
)
68
+ // no need for the ref nodes after initial patch
69
+ // this prevents keeping a detached DOM tree in memory (#5851)
70
+ vm.$options._parentElm = vm.$options._refElm = null
71
} else {
72
// updates
73
vm.$el = vm.__patch__(prevVnode, vnode)
@@ -129,8 +132,6 @@ export function lifecycleMixin (Vue: Class<Component>) {
129
132
if (vm.$el) {
130
133
vm.$el.__vue__ = null
131
134
}
- // remove reference to DOM nodes (prevents leak)
- vm.$options._parentElm = vm.$options._refElm = null
135
136
137
0 commit comments