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

Function disposeOnReturn

src/platform/common/utils/lifecycle.ts:215–222  ·  view source on GitHub ↗
(fn: (store: DisposableStore) => void)

Source from the content-addressed store, hash-verified

213}
214
215export function disposeOnReturn(fn: (store: DisposableStore) => void): void {
216 const store = new DisposableStore();
217 try {
218 fn(store);
219 } finally {
220 store.dispose();
221 }
222}
223
224/**
225 * A map the manages the lifecycle of the values that it stores.

Callers

nothing calls this directly

Calls 1

disposeMethod · 0.95

Tested by

no test coverage detected