* 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)
| 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. |
nothing calls this directly
no test coverage detected
searching dependent graphs…