mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
14 lines
225 B
JavaScript
14 lines
225 B
JavaScript
'use strict';
|
|
|
|
// Flags: --expose-gc
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
const w = new globalThis.WeakRef({});
|
|
|
|
setTimeout(() => {
|
|
globalThis.gc();
|
|
assert.strictEqual(w.deref(), undefined);
|
|
}, 200);
|