MCPcopy Create free account
hub / github.com/codeaashu/claude-code / dispose

Function dispose

src/utils/settings/changeDetector.ts:154–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152 * Fire-and-forget is still valid where timing doesn't matter.
153 */
154export function dispose(): Promise<void> {
155 disposed = true
156 if (mdmPollTimer) {
157 clearInterval(mdmPollTimer)
158 mdmPollTimer = null
159 }
160 for (const timer of pendingDeletions.values()) clearTimeout(timer)
161 pendingDeletions.clear()
162 lastMdmSnapshot = null
163 clearInternalWrites()
164 settingsChanged.clear()
165 const w = watcher
166 watcher = null
167 return w ? w.close() : Promise.resolve()
168}
169
170/**
171 * Subscribe to settings changes

Callers

nothing calls this directly

Calls 5

clearInternalWritesFunction · 0.85
valuesMethod · 0.80
clearMethod · 0.45
closeMethod · 0.45
resolveMethod · 0.45

Tested by

no test coverage detected