MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / dispose

Function dispose

packages/node/src/backend/nodeBackendInline.ts:640–665  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

638 },
639
640 dispose(): void {
641 if (disposed) return;
642 disposed = true;
643 clearPollLoop();
644 stopRequested = true;
645 if (engineId !== null && native !== null) {
646 try {
647 native.engineDestroy(engineId);
648 } catch {
649 // ignore
650 }
651 }
652 engineId = null;
653 started = false;
654 const err = new Error("NodeBackend(inline): disposed");
655 while (eventWaiters.length > 0) eventWaiters.shift()?.reject(err);
656 eventQueue = [];
657 if (startDef !== null && !startSettled) {
658 startSettled = true;
659 startDef.reject(err);
660 }
661 if (stopDef !== null && !stopSettled) {
662 stopSettled = true;
663 stopDef.reject(err);
664 }
665 },
666
667 requestFrame(drawlist: Uint8Array): Promise<void> {
668 if (disposed) return Promise.reject(new Error("NodeBackend(inline): disposed"));

Callers

nothing calls this directly

Calls 1

clearPollLoopFunction · 0.85

Tested by

no test coverage detected