summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Tests/gc-deeply-nested-object-graph.js
blob: 8b488d900bd999bb8f91fffbf6bd41631f64460e (plain)
1
2
3
4
5
6
7
8
9
10
11
test("garbage collection of a deeply-nested object graph", () => {
    let root = {};
    let o = root;

    for (let i = 0; i < 200_000; ++i) {
        o.next = {};
        o = o.next;
    }

    gc();
});