MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / cleanup

Function cleanup

examples/million-points/main.ts:543–555  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

541 */
542 let cleanedUp = false;
543 const cleanup = (): void => {
544 if (cleanedUp) return;
545 cleanedUp = true;
546
547 if (rafId !== null) cancelAnimationFrame(rafId);
548 ro.disconnect();
549 disposeSliderUi();
550 coordinator?.dispose();
551 coordinator = null;
552 gpuContext?.destroy();
553 gpuContext = null;
554 canvas.remove();
555 };
556
557 try {
558 // Establish initial canvas size before WebGPU init so GPUContext sees non-zero dimensions.

Callers 1

mainFunction · 0.70

Calls 3

disposeSliderUiFunction · 0.85
disposeMethod · 0.65
destroyMethod · 0.45

Tested by

no test coverage detected