Title: Virtual memory left after applet exit

I am trying to investigate excessive memory left after the applet exit. We have an applet that has to be able to restart multiple times in the same VM. I found that about 6Mb (!) are left in browser's virtual memory (Win2K's task manager processes column) each time when I create VirtualUniverse, Locale, Canvas3D, View, view BranchGroup and TransformGroup and ViewPlatform and add them together. In other words it's basic Java3D scene setup with no geometry that shows empty black screen. At the end of the applet we dispose of all our objects and Java3D objects, call VirtualUniverse.removeAllLocales(), and even destroy the window structure. I've also checked memory references in profiler: indeed everything is gone, and Java heap is cleaned up. Same problems occur in the test application, so it is not an applet problem.

Locale and view setup seem to be responsible for most of this memory. If I only create and add Canvas3D, virtual memory leftover becomes as low as 1Mb per run. If no canvas created, virtual memory does not go up.

Finally, this problem also seems to be dependent on operating system and graphics driver/hardware. My worst results are obtained on E&S Lightning 1200/Win2K. Running the same test on GeForce2MX/Win2K takes about 2.5Mb per run. Running the same test on RIVA TNT2/Win98 takes only about 0.5Mb per run in System Monitor Allocated Memory. We are using Java 1.3.1/Java3D 1.2.1/OpenGL.

Is this a problem associated with Java or native side resources? What can I do to release all that memory?

- Yuri

Reply via email to