MCPcopy
hub / github.com/callumalpass/tasknotes / destroy

Method destroy

src/utils/TaskManager.ts:996–1012  ·  view source on GitHub ↗

* Cleanup

()

Source from the content-addressed store, hash-verified

994 * Cleanup
995 */
996 destroy(): void {
997 // Clear all debounce timers
998 this.debouncedHandlers.forEach((timeoutId) => {
999 window.clearTimeout(timeoutId);
1000 });
1001 this.debouncedHandlers.clear();
1002
1003 // Unregister all event listeners
1004 this.eventListeners.forEach((ref) => {
1005 this.app.metadataCache.offref(ref);
1006 });
1007 this.eventListeners = [];
1008
1009 this.clearFilterIndexes();
1010 this.filterIndexesBuilt = false;
1011 this.initialized = false;
1012 }
1013
1014 /**
1015 * Delegate dependency methods to DependencyCache (will be set by main.ts)

Callers

nothing calls this directly

Calls 4

clearFilterIndexesMethod · 0.95
clearTimeoutMethod · 0.65
offrefMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected