MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / detachFiber

Function detachFiber

code/composition/public/app.js:11639–11651  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

11637 }
11638
11639 function detachFiber(current) {
11640 // Cut off the return pointers to disconnect it from the tree. Ideally, we
11641 // should clear the child pointer of the parent alternate to let this
11642 // get GC:ed but we don't know which for sure which parent is the current
11643 // one so we'll settle for GC:ing the subtree of this child. This child
11644 // itself will be GC:ed when the parent updates the next time.
11645 current['return'] = null;
11646 current.child = null;
11647 if (current.alternate) {
11648 current.alternate.child = null;
11649 current.alternate['return'] = null;
11650 }
11651 }
11652
11653 var emptyPortalContainer = void 0;
11654

Callers 2

ReactFiberCommitWorkFunction · 0.70
commitDeletionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected