I'm seeing some strange behavior in Chrome that I'm trying to verify is intended (or possibly a bug?). Here are the steps I took:
- First I opened the Chrome task manager, right-clicked and selected "JavaScript memory"
- Next I navigated to a test page that has a link that opens a new popup window when clicked
- The popup window loads a page that includes a lot of large third-party JavaScript libraries
- I checked the Chrome task manager and the JavaScript ram had increased significantly for the test page after opening the popup
- Finally, I closed the popup window and waited, but the memory usage basically stayed where it was at. Clicking the "Collect garbage" button in the timeline doesn't really free any of the memory.
If I clicked the link on the test page multiple times to open multiple popup windows, closing them doesn't seem to lower the memory usage.
I tried this test in IE and Firefox, and when closing the popups in those browsers the memory usage goes down as expected. I'm attaching a zip file with two simple html pages. One page has a button that opens a new tab with the other page. The second page simply creates a large JS array. Closing that tab doesn't free the ram (tabs seem to have the same symptoms as popup windows)