|
|
@@ -65,6 +65,9 @@ export function lifecycleMixin (Vue: Class<Component>) {
|
|
|
vm.$options._parentElm,
|
|
|
vm.$options._refElm
|
|
|
)
|
|
|
+ // no need for the ref nodes after initial patch
|
|
|
+ // this prevents keeping a detached DOM tree in memory (#5851)
|
|
|
+ vm.$options._parentElm = vm.$options._refElm = null
|
|
|
} else {
|
|
|
// updates
|
|
|
vm.$el = vm.__patch__(prevVnode, vnode)
|
|
|
@@ -129,8 +132,6 @@ export function lifecycleMixin (Vue: Class<Component>) {
|
|
|
if (vm.$el) {
|
|
|
vm.$el.__vue__ = null
|
|
|
}
|
|
|
- // remove reference to DOM nodes (prevents leak)
|
|
|
- vm.$options._parentElm = vm.$options._refElm = null
|
|
|
}
|
|
|
}
|
|
|
|