MCPcopy
hub / github.com/claude-code-best/claude-code / registerCleanup

Function registerCleanup

src/utils/cleanupRegistry.ts:14–17  ·  view source on GitHub ↗
(cleanupFn: () => Promise<void>)

Source from the content-addressed store, hash-verified

12 * @returns Unregister function that removes the cleanup handler
13 */
14export function registerCleanup(cleanupFn: () => Promise<void>): () => void {
15 cleanupFunctions.add(cleanupFn)
16 return () => cleanupFunctions.delete(cleanupFn) // Return unregister function
17}
18
19/**
20 * Run all registered cleanup functions.

Callers 15

addToHistoryFunction · 0.85
runFunction · 0.85
getProjectFunction · 0.85
startUdsMessagingFunction · 0.85
createSessionMethod · 0.85
config.tsFile · 0.85
getLogWriterFunction · 0.85
installAsciicastRecorderFunction · 0.85
doInitializeFunction · 0.85

Calls 2

deleteMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected