MCPcopy Index your code
hub / github.com/nodejs/node / cleanup

Function cleanup

lib/internal/test_runner/runner.js:676–680  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

674
675 // Cleanup function to remove event listener and prevent memory leak
676 const cleanup = () => {
677 watcher.removeListener('changed', onChanged);
678 opts.root.harness.watching = false;
679 opts.root.postRun();
680 };
681
682 if (opts.signal) {
683 kResistStopPropagation ??= require('internal/event_target').kResistStopPropagation;

Callers

nothing calls this directly

Calls 2

removeListenerMethod · 0.45
postRunMethod · 0.45

Tested by

no test coverage detected