Are there any add-ons for Firefox that I can use to find out with part of the JavaScript causes memory leaks?
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/