I was just viewing an animated gif thread on another board when I noticed that Firefox was using up over 500MB of RAM. I curse the "goddamned buggy POS" then did a bit of google investigation. Turns out, this "bug" is a "feature" (lol): Firefox, by default, caches that last X number of pages visited per session (where X is based on system memory). For 1G of system memory, Firefox caches the last eight pages you've visited. Therefore, in my animated gif thread example, Firefox had cached the last eight pages of animated gif! Luckily, you can fix this.
In the address bar type about:config
Find the setting for browser.sessionhistory.max_total_viewers
Change the value (-1 by default) to something like 2
Restart Firefox
Now, you should notice that Firefox will free memory every third page view. My animated gif thread now never causes Firefox to rise about 250MB.
It ain't perfect, but it helps.