MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / clearDisposable

Function clearDisposable

src/back/util/lifecycle.ts:33–36  ·  view source on GitHub ↗
(disposable: Disposable)

Source from the content-addressed store, hash-verified

31 * @param disposable Disposable to dispose the children of and then clear
32 */
33export function clearDisposable(disposable: Disposable) {
34 disposable.toDispose.forEach(d => dispose(d));
35 disposable.toDispose = [];
36}
37
38/**
39 * Register a disposable to its parent. They must not be the same.

Callers 1

disposeFunction · 0.85

Calls 2

disposeFunction · 0.85
forEachMethod · 0.80

Tested by

no test coverage detected