On the other hand, Microsoft Visual Studio 2005 leaks like a sieve, but it's the most helpful development environment I've ever seen. Perhaps memory leaks are found due to usefulness the way security flaws stem from popularity. That theory would conveniently explain the balance of bugs in Microsoft's OS code. But I digress.
There are some people (whose initials may be BMW) that will tell you that the best solution for this problem is to never install Firefox on a Microsoft OS. These are usually the same sort of people who still prefer vi to a text editor. Personally I'm not one to give up functionality for the sake of form, but what can a resource-constrained power-surfer do?
Well, the traditional method of freeing up resources lost to a leak is to restart the application. Back in the old days (like, three months ago) this was a major pain, involving bookmarking or finishing any open tabs, logging in to sites again and losing any form data that you might have entered on any open pages. Of course, there were extensions to fix any of those problems, but often they were a cause of the very problems you were trying to fix.
Thankfully, Firefox 2 fixed all that. I don't even want to know that you haven't updated yet, just go do it now. I'll wait. Anyway, Firefox 2 includes a crash recovery mode that can restore your entire session, usually without reloading the pages. Of course, this doesn't happen when you voluntarily close the browser, but you can see it in action when you install an extension. In fact, I suggest you check it out right now. Go install the Restarter extension from from the add-ons site. Once you've clicked the Install button (after the standard five-second penance), the Extension Manager will open to show the progress. Installing this tiny extension will probably take less time than the install delay. Once it's done, notice the Restart button? Click it. Go ahead, I'm patient.
That served two purposes. First, you have now seen the session restore function at work. Until now, the only way to trigger that as a user was after installing an extension. However, the tiny little extension that you just installed added an item to your File menu. At the bottom, just above Exit, there is now a Restart Firefox option. This will do exactly what the Restart button just did for you, so you can try this whenever the browser seems to have gotten bloated and slow.
This is far more convenient than a restart used to be, and it is guaranteed to free up any leaked memory, but it's still not always convenient. It's like rebooting the computer, almost guaranteed to fix the problem but sometimes like chasing a fly with a baseball bat. However, I found a potentially more useful tweak today in a post on Cybernet, which I found via Lifehacker's Best of April 2006. Here's what to do:
- Highlight the words config.trim_on_minimize and copy them to the clipboard.
- Open a new tab and type about:config
in the address bar. This will display a page of Firefox's internal configuration values. - Right-click anywhere on the page and select New -> Boolean from the context menu.
- Paste the copied text from above into the input box that appears and hit enter. Yes, you can type it if you'd prefer, I just found cut-and-paste more convenient.
- Select true as the value and click the OK button, then go to the File menu and click that new Restart Firefox option we just added.