MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / destroy

Method destroy

src/utils/PerformanceMonitor.ts:319–337  ·  view source on GitHub ↗

* Clean up all observers and resources

()

Source from the content-addressed store, hash-verified

317 * Clean up all observers and resources
318 */
319 destroy(): void {
320 // Disconnect all mutation observers
321 for (const observer of this.mutationObservers) {
322 observer.disconnect();
323 }
324 this.mutationObservers.clear();
325
326 // Disconnect all performance observers
327 for (const observer of this.performanceObservers) {
328 observer.disconnect();
329 }
330 this.performanceObservers.clear();
331
332 // Clear all data
333 this.clear();
334
335 // Reset singleton instance
336 PerformanceMonitor.instance = null;
337 }
338
339 /**
340 * Enable or disable performance monitoring

Callers

nothing calls this directly

Calls 2

clearMethod · 0.95
disconnectMethod · 0.45

Tested by

no test coverage detected