|
1 | 1 | 'use strict'; |
| 2 | +// Flags: --expose-gc |
2 | 3 | |
3 | 4 | const common = require('../common'); |
4 | 5 | const assert = require('assert'); |
@@ -22,6 +23,11 @@ common.crashOnUnhandledRejection();
|
22 | 23 | }, |
23 | 24 | }).enable(); |
24 | 25 | process.on('beforeExit', common.mustCall(() => { |
| 26 | +// This garbage collection call verifies that the wraps being garbage |
| 27 | +// collected doesn't resurrect the process again due to weirdly timed |
| 28 | +// uv_close calls and other similar instruments in destructors. |
| 29 | +global.gc(); |
| 30 | + |
25 | 31 | process.removeAllListeners('uncaughtException'); |
26 | 32 | hooks.disable(); |
27 | 33 | delete providers.NONE; // Should never be used. |
|