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 be07617 commit 3209f6fCopy full SHA for 3209f6f
src/core/instance/lifecycle.js
@@ -119,15 +119,18 @@ export function lifecycleMixin (Vue: Class<Component>) {
119
}
120
// call the last hook...
121
vm._isDestroyed = true
122
+ // invoke destroy hooks on current rendered tree
123
+ vm.__patch__(vm._vnode, null)
124
+ // fire destroyed hook
125
callHook(vm, 'destroyed')
126
// turn off all instance listeners.
127
vm.$off()
128
// remove __vue__ reference
129
if (vm.$el) {
130
vm.$el.__vue__ = null
131
- // invoke destroy hooks on current rendered tree
- vm.__patch__(vm._vnode, null)
132
+ // remove reference to DOM nodes (prevents leak)
133
+ vm.$options._parentElm = vm.$options._refElm = null
134
135
136
0 commit comments