Skip to content

Commit 43a42f7

Browse files
committed
Update clipboard-memory.test.ts
1 parent f77b66b commit 43a42f7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/opencode/test/util/clipboard-memory.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ describe("Clipboard Memory Leak", () => {
2626
await Clipboard.copy(`Memory test ${i}`)
2727
}
2828

29-
if (typeof Bun.gc === "function") Bun.gc(true)
30-
await new Promise((r) => setTimeout(r, 1000))
29+
// Aggressive GC - multiple passes with delays
30+
for (let i = 0; i < 5; i++) {
31+
if (typeof Bun.gc === "function") Bun.gc(true)
32+
await new Promise((r) => setTimeout(r, 500))
33+
}
3134

3235
const finalRSS = process.memoryUsage.rss()
3336
const growthMB = (finalRSS - baselineRSS) / 1024 / 1024

0 commit comments

Comments
 (0)