MCPcopy
hub / github.com/vuejs/core / cleanupEffect

Function cleanupEffect

packages/reactivity/src/effect.ts:569–582  ·  view source on GitHub ↗
(e: ReactiveEffect)

Source from the content-addressed store, hash-verified

567}
568
569function cleanupEffect(e: ReactiveEffect) {
570 const { cleanup } = e
571 e.cleanup = undefined
572 if (cleanup) {
573 // run cleanup without active effect
574 const prevSub = activeSub
575 activeSub = undefined
576 try {
577 cleanup()
578 } finally {
579 activeSub = prevSub
580 }
581 }
582}

Callers 2

runMethod · 0.85
stopMethod · 0.85

Calls 1

cleanupFunction · 0.50

Tested by

no test coverage detected