MCPcopy Index your code
hub / github.com/angular/angular / consumerDestroy

Function consumerDestroy

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

Source from the content-addressed store, hash-verified

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

Callers 5

cleanUpViewFunction · 0.90
destroyFunction · 0.90
destroyMethod · 0.90
refreshViewFunction · 0.90
destroyWatchNodeFunction · 0.90

Calls 2

consumerIsLiveFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…