![memory leak in firefox memory leak in firefox](https://user-images.githubusercontent.com/1090012/101065001-9e125200-3562-11eb-93fd-014207c16a41.png)
As you can see the footprint is about 1.5gb.
![memory leak in firefox memory leak in firefox](https://www.partitionwizard.com/images/uploads/articles/2020/11/firefox-memory-leak/firefox-memory-leak-thumbnail.jpg)
This fragment is about the Web process, but the main process also grows in size. Here is a dump of the about:memory page, after about 25 refreshes. How can I find out what the source of this problem is? Note that this only happens when refreshing the browser, so it seems unlikely that there is a problem with my SPA keeping event handlers running etc. The problem seems to get worse while the application has been growing.
![memory leak in firefox memory leak in firefox](https://articles-images.sftcdn.net/wp-content/uploads/sites/3/2011/08/firefox-experiment-new-firefox-6-process.png)
By that point I need to exit the browser or tab and start over. For a long time now, I have the problem that refreshing the page many times (like you do while debugging code) the memory footprint of Firefox grows to the point where the application is becoming extremely slow. $ so the DOM object will also remain in memory even if that function won't ever be called again.I have a rather large single page application written in Vue. That pattern is very clear with the tools.AddFunction: you pass a function to it and it stores that in an array, if we don't clear the reference in that array the function will remain in memory as long as the page lives, and usually those functions include references to JS that have a DOM object in its. So creating and destroying tens or hundreds of instances means that the page will keep references to functions and objects that could be cleaned up, but as there is some reference to it the js engine can't do it automatically. The problem talking here about "memory leak" is that usually that term means a leak in the browser after a page unloads due to a circular reference between JS and DOM, the architecture tries to avoid that problem, but here we are talking about JS objects that are created for each editor instance, and currently even if the editor is destroyed they remain in memory for that page.
#Memory leak in firefox Patch
The new patch includes the simplifications in editor.js, as well as removing the removeAllListeners for non-DOM objects, but the changes in the filebrowser and showborders plugin are still needed. Opera 10.5 beta 2 starts at 44Mb, increases in a slope to 88Mb and after that it seems to keep increasing little by little, something like 8Mb for another 100 runs Opera 10.10 runs stable at 50Mb, Safari 4 also runs stable at 44MbĬhrome 4 starts at 10Mb, does two jumps and ends in 30Mb In Firefox 3.6, it starts at 32Mb and then goes up to 54Mb, then the garbage collector runs and goes back to 42Mb, and it seems to keep that sawtooth graph, no big leaks, although it seems to point a certain increase. It has also the benefit that it can be used with any browser, not just IE.Ĭurrently, running 100 loops of the test page with all the plugins jumps in IE6 from 31 to 38Mb, so it's under 100Kb per instance, IE8 goes from 39 to 43Mb (something like 50Kb) They will report and keep in memory nodes that are used in for example, but testing in the real IE doesn't show any such problems.įor my tests I'm using Process Explorer and looking at the Private bytes in the Performance Graph tab of the process that I want to test. Some info for anyone wanting to test this:ĭrip or sIEve can't be used correctly to test the leaks due to and