On Mon, 10 Feb 2025 17:03:49 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
> You are probably right about `System.gc()` being called too often. I would > say though that the purpose of this test is to uncover initialization issues > rather than finding other problems with the controls, so it's probably ok as > is. it still might be worth a follow-up bug. As it is, calling `System.gc()` each time through the loop means that you are creating far fewer objects than you would in a tight loop (by an order of magnitude based on a few quick tests I did). > For the OOME - there seems to be no leak, since the memory usage drops down > to initial values either using `System.gc()` in the loop, or when running in > the IDE with the large heap: the memory fills up rather quickly, then drops > again down to low value when one hits "Run GC" in the VirtualVM for example. When I run it with `-verbose:gc` I see the memory continually increasing, although slowly. I'll try it with Visual VM and see if I spot anything. In any case, if there is a leak here, it isn't a large one (and isn't directly related to this bug), so would be something to look into as a follow-up. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1698#issuecomment-2648821316