MCPcopy Create free account
hub / github.com/angular/angular / consumerDestroy

Function consumerDestroy

packages/core/primitives/signals/src/graph.ts:506–520  ·  view source on GitHub ↗
(node: ReactiveNode)

Source from the content-addressed store, hash-verified

504 * Disconnect this consumer from the graph.
505 */
506export function consumerDestroy(node: ReactiveNode): void {
507 if (consumerIsLive(node)) {
508 // Drop all connections from the graph to this node.
509 let link = node.producers;
510 while (link !== undefined) {
511 link = producerRemoveLiveConsumerLink(link);
512 }
513 }
514
515 // Truncate all the linked lists to drop all connection from this node to the graph.
516 node.producers = undefined;
517 node.producersTail = undefined;
518 node.consumers = undefined;
519 node.consumersTail = undefined;
520}
521
522/**
523 * Add `consumer` as a live consumer of this node.

Callers 7

cleanUpViewFunction · 0.90
destroyFunction · 0.90
destroyMethod · 0.90
refreshViewFunction · 0.90
runDebugWatchFunction · 0.90
unwatchSignalFunction · 0.90
destroyWatchNodeFunction · 0.90

Calls 2

consumerIsLiveFunction · 0.85

Tested by

no test coverage detected