MCPcopy Create free account
hub / github.com/angular/components / ngOnDestroy

Method ngOnDestroy

src/cdk/tree/tree.ts:1407–1417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1405 }
1406
1407 ngOnDestroy() {
1408 // If this is the last tree node being destroyed,
1409 // clear out the reference to avoid leaking memory.
1410 if (CdkTreeNode.mostRecentTreeNode === this) {
1411 CdkTreeNode.mostRecentTreeNode = null;
1412 }
1413
1414 this._dataChanges.complete();
1415 this._destroyed.next();
1416 this._destroyed.complete();
1417 }
1418
1419 getParent(): CdkTreeNode<T, K> | null {
1420 return this._tree._getNodeParent(this) ?? null;

Callers

nothing calls this directly

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected