Posted by demonduck
on February 14, 2009 at 11:02 AM PST
Using this applet param:
I get no garbage collection output.
I'm very careful in my applet to only use and reuse class and automatic variables. I don't create anything at runtime but I can't imagine the whole JVM being that frugal. I call System.gc() explicitly at specific times after user input -- dragging the mouse or keyboard input.
Is the JVM that good about not creating and nulling objects at runtime that I don't see anything? I'm doing a fair amount of computation for each frame. The frame rate is shown in the console. I use lots of transcendental functions in the Math package and use BufferStrategy and MemoryImageSource to draw. Am I not setting the params right or is there just no garbage collecting happening?
Here's the applet: