3 ms·
If you want to test the GC in Javascript, try out an infinite loop of unreferenced allocations. Generational GC should be able to handle this without breaking
by stcredzero 18y ago
If you want to test the GC in Javascript, try out an infinite loop of unreferenced allocations. Generational GC should be able to handle this without breaking a sweat.
- paulgb 18y agoActually, I wasn't trying to test the javascript VM at all, just how the browser handled an infinite loop of alert dialogs. Since alert windows steal focus, an infinite loop of them will keep stealing focus. I wanted to know how Chrome would handle this.
- stcredzero 18y agoI didn't think you were barking up the wrong tree. It's another suggestion. You might need some kind of "yield" statement if you want to see how another Javascript program will act with a background window spamming it with allocations.