fix(runtime-core): component mount anchor memory leak (#2459)
fix #2458
This commit is contained in:
parent
82bf7ebf36
commit
3867bb4c14
@ -1395,8 +1395,9 @@ function baseCreateRenderer(
|
||||
}
|
||||
// onVnodeMounted
|
||||
if ((vnodeHook = props && props.onVnodeMounted)) {
|
||||
const scopedInitialVNode = initialVNode
|
||||
queuePostRenderEffect(() => {
|
||||
invokeVNodeHook(vnodeHook!, parent, initialVNode)
|
||||
invokeVNodeHook(vnodeHook!, parent, scopedInitialVNode)
|
||||
}, parentSuspense)
|
||||
}
|
||||
// activated hook for keep-alive roots.
|
||||
@ -1410,6 +1411,9 @@ function baseCreateRenderer(
|
||||
queuePostRenderEffect(a, parentSuspense)
|
||||
}
|
||||
instance.isMounted = true
|
||||
|
||||
// #2458: deference mount-only object parameters to prevent memleaks
|
||||
initialVNode = container = anchor = null as any
|
||||
} else {
|
||||
// updateComponent
|
||||
// This is triggered by mutation of component's own state (next: null)
|
||||
|
Loading…
Reference in New Issue
Block a user