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

Function cleanup

examples/annotations/main.ts:299–306  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297
298 let cleanedUp = false;
299 const cleanup = (): void => {
300 if (cleanedUp) return;
301 cleanedUp = true;
302 window.removeEventListener('beforeunload', cleanup);
303 modeToggle.checkbox.removeEventListener('change', onToggleChange);
304 modeToggle.host.remove();
305 disposeChart();
306 };
307
308 window.addEventListener('beforeunload', cleanup);
309 import.meta.hot?.dispose(cleanup);

Callers

nothing calls this directly

Calls 1

disposeChartFunction · 0.70

Tested by

no test coverage detected