mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Clear more Fiber fields in detachFiber (#18556)
This commit is contained in:
@@ -1118,6 +1118,7 @@ function detachFiber(fiber: Fiber) {
|
||||
// itself will be GC:ed when the parent updates the next time.
|
||||
fiber.return = null;
|
||||
fiber.child = null;
|
||||
fiber.sibling = null;
|
||||
fiber.memoizedState = null;
|
||||
fiber.updateQueue = null;
|
||||
fiber.dependencies = null;
|
||||
@@ -1127,6 +1128,9 @@ function detachFiber(fiber: Fiber) {
|
||||
fiber.pendingProps = null;
|
||||
fiber.memoizedProps = null;
|
||||
fiber.stateNode = null;
|
||||
if (__DEV__) {
|
||||
fiber._debugOwner = null;
|
||||
}
|
||||
}
|
||||
|
||||
function emptyPortalContainer(current: Fiber) {
|
||||
|
||||
@@ -1118,6 +1118,7 @@ function detachFiber(fiber: Fiber) {
|
||||
// itself will be GC:ed when the parent updates the next time.
|
||||
fiber.return = null;
|
||||
fiber.child = null;
|
||||
fiber.sibling = null;
|
||||
fiber.memoizedState = null;
|
||||
fiber.updateQueue = null;
|
||||
fiber.dependencies = null;
|
||||
@@ -1127,6 +1128,9 @@ function detachFiber(fiber: Fiber) {
|
||||
fiber.pendingProps = null;
|
||||
fiber.memoizedProps = null;
|
||||
fiber.stateNode = null;
|
||||
if (__DEV__) {
|
||||
fiber._debugOwner = null;
|
||||
}
|
||||
}
|
||||
|
||||
function emptyPortalContainer(current: Fiber) {
|
||||
|
||||
Reference in New Issue
Block a user