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

Function detachFiber

code/new-context-api/public/app.js:10862–10874  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

10860 }
10861
10862 function detachFiber(current) {
10863 // Cut off the return pointers to disconnect it from the tree. Ideally, we
10864 // should clear the child pointer of the parent alternate to let this
10865 // get GC:ed but we don't know which for sure which parent is the current
10866 // one so we'll settle for GC:ing the subtree of this child. This child
10867 // itself will be GC:ed when the parent updates the next time.
10868 current['return'] = null;
10869 current.child = null;
10870 if (current.alternate) {
10871 current.alternate.child = null;
10872 current.alternate['return'] = null;
10873 }
10874 }
10875
10876 var emptyPortalContainer = void 0;
10877

Callers 2

ReactFiberCommitWorkFunction · 0.70
commitDeletionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected