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

Function registerBeforeExit

lib/internal/process/finalization.js:115–120  ·  view source on GitHub ↗

* Execute the given function before the process exits, * and clean things up when the object is gc. * @param {any} obj * @param {Function} fn

(obj, fn)

Source from the content-addressed store, hash-verified

113 * @param {Function} fn
114 */
115 function registerBeforeExit(obj, fn) {
116 emitExperimentalWarning('process.finalization.registerBeforeExit');
117 validateObject(obj, 'obj', kValidateObjectAllowFunction);
118
119 _register('beforeExit', obj, fn);
120 }
121
122 /**
123 * Unregister the given object from the onExit or onBeforeExit event.

Callers

nothing calls this directly

Calls 2

emitExperimentalWarningFunction · 0.85
_registerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…