* Execute the given function when the process exits, * and clean things up when the object is gc. * @param {any} obj * @param {Function} fn
(obj, fn)
| 100 | * @param {Function} fn |
| 101 | */ |
| 102 | function register(obj, fn) { |
| 103 | emitExperimentalWarning('process.finalization.register'); |
| 104 | validateObject(obj, 'obj', kValidateObjectAllowFunction); |
| 105 | |
| 106 | _register('exit', obj, fn); |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * Execute the given function before the process exits, |
nothing calls this directly
no test coverage detected
searching dependent graphs…