PR-URL: https://github.com/nodejs/node/pull/29874 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
13 lines
254 B
JavaScript
13 lines
254 B
JavaScript
'use strict';
|
|
|
|
// Flags: --expose-gc --harmony-weak-refs
|
|
|
|
const common = require('../common');
|
|
|
|
const g = new globalThis.FinalizationGroup(common.mustCallAtLeast(1));
|
|
g.register({}, 42);
|
|
|
|
setTimeout(() => {
|
|
globalThis.gc();
|
|
g.cleanupSome();
|
|
}, 200);
|