1
Support / problem with applet and heap space
« on: August 26, 2006, 05:43:35 pm »
hi!
i implemented to version to run as an applet. first one uses open-hardware-renderer and second one the software-renderer.
ok, that works greate.
problem is that the heap space is typically limited to 96MB.
after loading the textures and some parts of the world free space is very critical and added a function that removes parts of the world which are invisible (as application i still set them invisible and it works also). ok, that's not the problem as the case may be could be better if i could set them also in applet invisible. but in this place the user has to change the settings for reserved space for applets himself.
but the biggest problem is reloading the applet without restarting the browser.
i set destroy and stop function to free used space but it don't work.
destroy() function looks like
and stop()
after the (!exit)- loop ( ) in mainloop()
i set the following
and destroy in opengl-mode the key- and mousemapper
but then i reload the page or get page back and return the applet begins to start...first with adding the textures to texmanager...but then it stops with the error memoryoutofspace: java heap space...
what could be wrong with this?
i test to clear cache and restart it but the same mistake. when i restart the browser i can start it normally. i also tested it by calling the carbage collection (System.gc()) at the end but also without any changes...
could be very nice if someone could help me because the hand over for the applet is in a few days :?
i implemented to version to run as an applet. first one uses open-hardware-renderer and second one the software-renderer.
ok, that works greate.
problem is that the heap space is typically limited to 96MB.
after loading the textures and some parts of the world free space is very critical and added a function that removes parts of the world which are invisible (as application i still set them invisible and it works also). ok, that's not the problem as the case may be could be better if i could set them also in applet invisible. but in this place the user has to change the settings for reserved space for applets himself.
but the biggest problem is reloading the applet without restarting the browser.
i set destroy and stop function to free used space but it don't work.
destroy() function looks like
Code: [Select]
texMan.flush();
Object3D.resetNextID();
stop();
super.destroy();
and stop()
Code: [Select]
if(loopThread == null){
loopThread.destroy();
loopThread = null;
}
exit = true;
after the (!exit)- loop ( ) in mainloop()
i set the following
Code: [Select]
world.removeAll();
world = null;
and destroy in opengl-mode the key- and mousemapper
but then i reload the page or get page back and return the applet begins to start...first with adding the textures to texmanager...but then it stops with the error memoryoutofspace: java heap space...
what could be wrong with this?
i test to clear cache and restart it but the same mistake. when i restart the browser i can start it normally. i also tested it by calling the carbage collection (System.gc()) at the end but also without any changes...
could be very nice if someone could help me because the hand over for the applet is in a few days :?