Hi there, I know this might sound like more appropriate for JOGL or Xith forum but still it might be a completely different issue.
My Xith based app uses tons of geometry and textures, we are trying to be smart by implementing Texture and geometry managers as the nature of application requires reusing same geometry all over the place (just under different transforms). Xith has a shared copy feature which is supposed to do instancing. After some experimentation it appeared like Xith’s sharedNode feature works fine. We did some tests and using shared nodes proved to be a huge gain when heap size is profiled. On the other side the process size is going crazy with memory usage and barely ever goes down even when complete cleanup is done (all objects destroyed and GCed) the process mem usage doesn’t go down.
My assumption is that the leak like this can only appear somewhere in Xith or JOGL using NIO Buffers. Does anyone know if NIO Buffers can cause this behavior if not managed properly ?
In some examples that we did, our heap usage will be around 750 Mb while Java allocates around 950Mb, the process size goes up to 1.7Gb. After cleaning up all the 3d data and garbage collecting explicitly, Java heap usage is at 125Mb it still has its 950Mb allocated (expected). If we start adding object to the heap again, the process size will go up and eventually crash when process size reaches 2Gb and windows bails out of virtual memory.
Does anyone know if Java 3d handles instancing better and if it has any similar memory leaks. I am willing to switch to other APIs preferably Java3D rather than fixing Xith on a low level.