Marvin, I know that I had reported this in another thread, and I had hoped that it had been resolved but it doesn't appear to be so. If you try running the BSPLoaderTest two or more times (each time returning to the Xith3DTestLauncher) you should get an OutOfMemoryError. I get this when I try to run the BSPLoaderTest a second time. When I ran the Xith3DTestLauncher and I set the memory to 128 MB using the runtime option
-Xmx128m
I was able to run the test about 5 or so times before I got the error again. I had done a little research and was able to come up with
this. This utility, which is included with the jdk, basically analyzes a heap dump file created by the JVM on an OutOfMemoryError. When jhat is ran against a heap dump file it creates a webserver which can be reached at
http://localhost:7000 and it displays all of the objects that were open at the time the heap dump was created. It also has different ways to display the information. An easy way to get to create the heap dump file is to add
-XX:+HeapDumpOnOutOfMemoryError
as a runtime option. Upon getting the OutOfMemoryError the heap dump file will be created. Afterwards jhat can be ran using
jhat -J-Xmx512m <path to heap dump file>
The -J-Xmx512m tells jhat to use up to 512 MB I had to do this because I was getting an OutOfMemoryException when trying to run jhat without that option.
I couldn't really make out much except for the obvious fact that there sure seems to be a lot more stuff than there should be. On the file with the 128 MB there were 5 instances of BSPLoaderTest which indicates to me that things are not getting completely de-referenced (I'm not sure if that's a word). I am thinking that at least one major item is remaining referenced which might explain why the garbage collection is apparently not working. It was also interesting to see that there was about 35 MB being taken up by floats (I think it said class [F) alone which would seem to be from all of the Tuple3F, Vector3F, etc. that are not being removed properly. EDIT: The 35 MB was when I had the memory allocation set to 128 MB.
I hope that this was helpful and I hope that someone can figure this one out. I will probably keep looking into the problem some more, but I am hoping that someone will be able to make sense of the report better than I.
EDIT: When pulling up the webpage, if you scroll all the way to the bottom there is a heap histogram which I found pretty useful and informative.