On Windows, when the application is minimized, the OS frees up memory associated with the application by placing data in a page file. Other garbage collection may also be performed.
In the case of an Internet browser running my javascript application, I find that if memory usage starts at 60 MB, then minimizing the browser reduces the memory to 17 MB. Maximization then restores up to 40 MB.
An increase of 20 mb.
My application makes heavy use of javascript, and I suspect that IE forces a large collection of objects that are no longer referenced.
Through javascript (IE only) you can force garbage collection through:
CollectGarbage()
So, if I call this method (without minimizing the screen), I return only mega or 2.
If I call this through the event queue:
setTimeout(CollectGarbage, 1000)
I am returning about 3 megabytes
My application is designed for the whole day, so memory management is very important.
Anyone have any ideas how to get IE to clear their memory to the same extent as a manual mini-pen?
Suggestions for software reduction of the browser will mock us!
Greetings :)
source share