mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
src: fix closing weak HandleWraps on GC
In 0af62aae07, this was overlooked, with it
possibly leading to hard crashes.
Refs: https://github.com/nodejs/node/pull/29317
PR-URL: https://github.com/nodejs/node/pull/29640
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
f634f37be0
commit
e74f30894c
2 files changed
+7
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
// Flags: --expose-gc
|
||||
'use strict';
|
||||
|
||||
const common = require('../common');
|
||||
@@ -97,3 +98,7 @@ const {
|
||||
}
|
||||
spinAWhile();
|
||||
}
|
||||
|
||||
// Make sure that the histogram instances can be garbage-collected without
|
||||
// and not just implictly destroyed when the Environment is torn down.
|
||||
process.on('exit', global.gc);
|
||||
Reference in new issue
Block a user