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

Function cleanup

examples/worker-streaming/main.ts:237–244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235 // Cleanup
236 let cleanedUp = false;
237 const cleanup = (): void => {
238 if (cleanedUp) return;
239 cleanedUp = true;
240 streaming = false;
241 if (intervalId !== null) clearInterval(intervalId);
242 ro.disconnect();
243 chart.dispose();
244 };
245
246 window.addEventListener('beforeunload', cleanup);
247 import.meta.hot?.dispose(cleanup);

Callers

nothing calls this directly

Calls 1

disposeMethod · 0.65

Tested by

no test coverage detected