Click to See Complete Forum and Search --> : Applets


Bobby
August 12th, 1999, 08:43 AM
I am frequently getting Out of memory exception in my applet when it is run for a long time. How to remove this exception ?

varbsjava
August 13th, 1999, 05:25 AM
If u r using the browser, u can use the Java Plugin.(Just a suggestion).
Install the Java-Plugin in your machine. After that go to your Java-Plugin Control Panel, which u can see under Start->Programs. U can find a text box for setting the Java Runtime Parameters.
There set the value for the heapsize of the browser JVM as -Xms2M -Xmx6M. Just try this. I haven't tried this out. If it works reply.

Also while creating objects,take care that u are not creating them unnecessariy. Then reduce the scope of the object and also make objects eqaul to null if u won't need them. This allows GC to do garbage collection and some memory will be available for your memory allocation pool(ie. heap). As you said your program runs for a long time, then this above thing will solve your problem more.


Hope this might solve yours.

regards,
arun...