Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F5365525
test_timer_fired_timeout_gc.cjs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
409 B
Referenced Files
None
Subscribers
None
test_timer_fired_timeout_gc.cjs
View Options
const assert = require('node:assert');
let ref;
{
let callback = () => {};
ref = new WeakRef(callback);
setTimeout(callback, 0);
callback = null;
}
function forceAllocations() {
for (let i = 0; i < 200000; i++) {
({ i, value: `timer-gc-${i}` });
}
}
setTimeout(() => {
forceAllocations();
assert.strictEqual(ref.deref(), undefined);
console.log('timer:fired-timeout-gc:ok');
}, 10);
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sun, May 17, 5:45 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
554533
Default Alt Text
test_timer_fired_timeout_gc.cjs (409 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment