I've created an MD2 loader and viewer, and in testing the viewer as an applet, I have found that once in a while I get an OutOfMemoryError.
 
What happens is, I have a index.html that has links to diffrent pages where an MD2Viewer looks at an MD2 file, when I click on one of the links the page is brought up and the MD2 file loads as a morph and is animated and the user can rotate it around. If you go back the index, and start clicking on the other links to view other MD2 files, after a while of doing that eventually an OutOfMemoryError occures, this sometimes also occures during the animation of a morph, in that the animation will halt and an OutOfMemoryError will return.
 
I've seen this issue brought up here before, and the solution was to increase the memory from 16megs upward, but I dont think this is the same case, so what I want to know is how do I free memory from previous views? I noticed the only time the VM shutsdown and frees the memory is when I exit the browser, is there another way to free the memory it allocated or to shut the VM down when the user leaves the page?
 
Also just in case in the future some models may be large, how does someone increase the memory of an applet?
 
Leyland Needham
 

Reply via email to