14

Are there any add-ons for Firefox that I can use to find out with part of the JavaScript causes memory leaks?

Yi Jiang
  • 49,435
  • 16
  • 136
  • 136
cometta
  • 35,071
  • 77
  • 215
  • 324

3 Answers3

10

I've got nothing for firefox, but the webkit inspector in Chrome has a profiler built in that is great for that kind of thing.

As an added bonus it also shows you all browser events such as repaints, so you can engineer your code to have the least impact on the browser.

xzyfer
  • 13,937
  • 5
  • 35
  • 46
  • 5
    -1: That's completely useless when the leak only occurs in Firefox. Does not answer the question whatsoever. – Lightness Races in Orbit Mar 05 '12 at 12:59
  • 6
    @LightnessRacesinOrbit that would only be a problem if your code had wholly separate codepaths for FF. Probably 95% of the time fixing a memory leak in Chrome will fix it for all the other browsers. – Daniel Lyons Oct 29 '12 at 16:20
  • 1
    @DanielLyons I have to agree with LightnessRacesinOrbit on this. It is not the correct answer because of those 5% you are saying. Would you consider your software correct if it was not doing what it was suppose to 5% of the times? It is a helpful answer (agree with you on that) but it is not the correct one for the question. Having said I am in those 5% now, so that is why I am saying this. (can you imagine a bridge that will only stand 95% of the times it gets high winds?) – RGPT Mar 11 '14 at 02:27
  • @RGPT A long time ago, in a galaxy far, far away… – Daniel Lyons Mar 11 '14 at 06:48
  • Does not help, because Firefox was requested, I really searched for Firefox – prdatur Mar 07 '15 at 11:11
8

Use Drip.exe / IEleak, I used it a lot to search for memory leaks!

Other hits:

powtac
  • 40,542
  • 28
  • 115
  • 170
7

The best memory profiler I've found is for IE (supports even IE6 ;-). Give it a go - you will be surprised how good it is:

http://ajax.dynatrace.com/ajax/en/

Jakub Konecki
  • 45,581
  • 7
  • 87
  • 126
  • I tried evaluating dynaTrace, and I don't see any memory profiling features at all. However, it does look pretty cool for general performance profiling. – Josh Mouch Feb 14 '12 at 06:18