()
| 11 | let maxGC = 10; |
| 12 | |
| 13 | function run() { |
| 14 | globalThis.gc(); |
| 15 | setImmediate(() => { |
| 16 | gcCount++; |
| 17 | if (ref.get() === undefined) { |
| 18 | return; |
| 19 | } else if (gcCount < maxGC) { |
| 20 | run(); |
| 21 | } else { |
| 22 | throw new Error(`Reference is still around after ${maxGC} GC`); |
| 23 | } |
| 24 | }); |
| 25 | } |
| 26 | |
| 27 | setDeserializeMainFunction(() => { |
| 28 | obj = null; |
no test coverage detected