mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
15 lines
316 B
JavaScript
15 lines
316 B
JavaScript
export function gc() {
|
|
Bun.gc(true);
|
|
}
|
|
|
|
// we must ensure that finalizers are run
|
|
// so that the reference-counting logic is exercised
|
|
export function gcTick(trace = false) {
|
|
trace && console.trace("");
|
|
// console.trace("hello");
|
|
gc();
|
|
return new Promise((resolve) => {
|
|
setTimeout(resolve, 0);
|
|
});
|
|
}
|