Hi,
You are all right! Garbage collection is supposed to free memory. It is intimately raleted to the way the JAVA Language works. Java is a object oriented language meaning that each time a object is constructed, memory is reserved for it. That memore is not available other application nor to other objects withing the app. I'm not going to explain what an object is in details but lets give an examples. In the interface of PW there are buttons, dropdown lists, etc. these are all objects. They are obvious object because you can see them. There's probably hundreds of objects that we cannot see because they are used in the background of the application. An Java Application is built of objects.
Each objects has to be constructed... This mean that memory is allocated for it. In other languages like C++ you construct an object and you destroy it once you don't need it anymore. If you forget to destroy your object the memory will stay allocated and will not be available for other programs or other objects.
That is called a memory leak.
JAVA does not use destructors. You construct the object and JAVA is suppose to destroy it when it is not used anymore. Once in a while JAVA garbage collects all the objects that are not used anymore and therefore frees-up memory so it can be reused. JAVA takes care of that by itself.
When programming, there is an instruction that can be used to tell JAVA that you think it would be time for a garbage collection. It kind of "forces" a garbage collect.
The Menu you are referencing in this topic was probably placed there by developpers so that they could use it a developpement time. It is probably a left over. If it was left there by purpose, it is probably because they add memory leaks problems and were not able to fix it. In that situation, a quick an dirty fix is to allow the user to ask for garbage collection himself.
Having to manually aks for garbage collection is the result of poor programmation... By saying that, I don't want to insult the developper at EasyPano... Maybe they did have a choice. Sometime application developpement brings problems that cannot be solve easily and require a hack of some sort.
Anyway! Hope this helps understand what garbage collection is
Cheers
------------- Bentech
www.panomedia.ca
|