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

Function cleanup

examples/sampling/main.ts:230–236  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228
229 let cleanedUp = false;
230 const cleanup = (): void => {
231 if (cleanedUp) return;
232 cleanedUp = true;
233 if (rafId !== null) cancelAnimationFrame(rafId);
234 ro.disconnect();
235 chart.dispose();
236 };
237
238 window.addEventListener('beforeunload', cleanup);
239 import.meta.hot?.dispose(cleanup);

Callers

nothing calls this directly

Calls 1

disposeMethod · 0.65

Tested by

no test coverage detected