MCPcopy Index your code
hub / github.com/apache/tvm / endScope

Method endScope

web/src/runtime.ts:248–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246 }
247
248 endScope(): void {
249 if (this.autoDisposeScope.length === 0) {
250 throw Error("tvm.endScope called when the stack is empty.");
251 }
252 // automatically dispose all the tracked values in the current scope.
253 const currScope = this.autoDisposeScope.pop() as Array<Disposable | undefined>;
254 for (let i = 0; i < currScope.length; ++i) {
255 const val = currScope[i];
256 if (val !== undefined) {
257 val.dispose();
258 }
259 }
260 }
261
262 /**
263 * Track object for dispose in current scope.

Callers

nothing calls this directly

Calls 2

popMethod · 0.45
disposeMethod · 0.45

Tested by

no test coverage detected