[Alicloud originalArticle, The post must specify the source of the article link!]
Today, I saw a friend posted a post on the BBS about the Javascript directory tree control.ProgramMemory usage cannot be released, which reminds me of an article about the JS memory management mechanism I saw online some time ago. I forgot about the content and only vaguely remembered: refreshing the page does not cause JavaScript to recycle memory. Minimizing the window will cause memory to be recycled! So I decided to perform a test to see if the minimum window memory will be recycled! The process is as follows:
Press CTRL + ALT + DEL to open the "Task Manager" and go to the "process" Page. (to facilitate observation, click the Options menu, select "front-end display" (checked above )). Open the main page of the http://www.9499.net, observe the CPU and the change in the icycler.exe process at the same time, right-click the directory tree on the left of the home page, select "refresh", observe CPU and memory change icycler.exe process at the same time, determine that the process is the process we. Refresh several times. The memory usage of the corresponding process is increased by 2 ~ 3 M. Next, minimize the number. Check whether the memory usage of IE has suddenly fallen. What I see here is that it has suddenly fallen from 50 m to about 1 m, and then rebounded!
This experiment demonstrates that refreshing the page will not cause JavaScript to recycle the memory. Minimizing the window will cause memory collection!