Barring browser errors / extensions, browsers free up resources when they are no longer needed; Firefox cleans up compartments , Chrome kills processes and its associated storage.
Firefox does its best, but it may take some time to clear the memory and can sometimes create zombie compacts :
Compartments are destroyed when they are collected in garbage. This happens some time after the last link to them disappears. This means that there may be a delay between the page being closed and the disappearance of its compartments ...
Sometimes due to errors in Firefox add SDK add-ins and / or add-ons that are not destroyed. This is a special type of memory leak, and they cause Firefox's memory usage to gradually increase over time, slowing it down and leading to a more severe crash.
Chrome uses a process for each tab (and indeed subprocesses for some objects in the tab, as well as IIRC, such as plugins, iframes, etc.) with the same effect. Although a quick check on chrome://memory-redirect/ and updating the tab looks like it is using pid . Therefore, updating is not a completely clean list.
FWIW Chrome has a "Force Reload" that clears the cache and can be useful for clearing more memory or a placebo: cmd-shift-r
I am not very familiar with the internal components, but I only saw that it was not reliably released between updates when a particular browser was getting too smart and trying to save things, when you did not change the origin, etc., to improve download performance.
In short, you can turn off the browser error if you do not see the freed memory as you expect, but you want to use various "about: memory" tools to check that at this point it will be from you to avoid this behavior and / or report this issue to your browser development team .
Otherwise, I think you're best off looking at your own memory leaks on the page using the various tools available.
mczepiel
source share