(node: ReactiveNode)
| 504 | * Disconnect this consumer from the graph. |
| 505 | */ |
| 506 | export 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. |
no test coverage detected