JApplet Memory Leakage/GarbageCollection - TechRepublic
General discussion
January 18, 2002 at 11:00 PM
drprabhu

JApplet Memory Leakage/GarbageCollection

by drprabhu . Updated 24 years, 5 months ago

We have a JApplet and it loads several JApplets in other frames on click of menu items. These new JApplets are destroyed when new menu items are clicked and then these Japplets are again called with another set of data. We found that the memory usage continuously went up and the memory occupied by the objects of the destroyed JApplets apparently did not get released or garbage collected. As a result, soon we ran out of memory.

We have tried the following without any positive results:

1. We have explicitly set all Objects held by the called JApplets to ‘null’ in destroy() method.

2. We have explicitly called Runtime.gc() (to call garbage collector to free the memory) and dealloc()).

3. We have looked into our code and confirmedthat there were no circular references to the objects.

Any solution?

This discussion is locked

All Comments