File tree 1 file changed +5
-1
lines changed
packages/runtime-core/src 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1395,8 +1395,9 @@ function baseCreateRenderer(
1395
1395
}
1396
1396
// onVnodeMounted
1397
1397
if ( ( vnodeHook = props && props . onVnodeMounted ) ) {
1398
+ const scopedInitialVNode = initialVNode
1398
1399
queuePostRenderEffect ( ( ) => {
1399
- invokeVNodeHook ( vnodeHook ! , parent , initialVNode )
1400
+ invokeVNodeHook ( vnodeHook ! , parent , scopedInitialVNode )
1400
1401
} , parentSuspense )
1401
1402
}
1402
1403
// activated hook for keep-alive roots.
@@ -1410,6 +1411,9 @@ function baseCreateRenderer(
1410
1411
queuePostRenderEffect ( a , parentSuspense )
1411
1412
}
1412
1413
instance . isMounted = true
1414
+
1415
+ // #2458: deference mount-only object parameters to prevent memleaks
1416
+ initialVNode = container = anchor = null as any
1413
1417
} else {
1414
1418
// updateComponent
1415
1419
// This is triggered by mutation of component's own state (next: null)
You can’t perform that action at this time.
0 commit comments