MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / clear

Method clear

src/platform/common/utils/lifecycle.ts:120–130  ·  view source on GitHub ↗

* Dispose of all registered disposables but do not mark this object as disposed.

()

Source from the content-addressed store, hash-verified

118 * Dispose of all registered disposables but do not mark this object as disposed.
119 */
120 public clear(): void {
121 if (this._toDispose.size === 0) {
122 return;
123 }
124
125 try {
126 dispose(this._toDispose);
127 } finally {
128 this._toDispose.clear();
129 }
130 }
131
132 /**
133 * Add a new {@link IDisposable disposable} to the collection.

Callers 1

disposeMethod · 0.95

Calls 2

disposeFunction · 0.70
clearMethod · 0.65

Tested by

no test coverage detected