Free up system memory by killing Dashboard widgets
I like Dashboard a lot, I really do, but it can be an awful memory hog even when it’s not being used. Once you hit F12, the widgets are loaded and don’t quit automatically which makes accessing them later faster, but it also wastes system resources. It’s not uncommon for each widget to take up 15mb of real ram and over 300mb in virtual memory. Having a bunch of widgets open aimlessly in the background can lead to system slowdowns, so here are three different ways to free up memory and kill the Dashboard temporarily.
Terminal: The easiest way to kill all the Dashboard widgets is by killing the Dock (Dock is the parent process to Dashboard), don’t worry, the Dock will automatically reload in the Finder. Open up the Terminal and type the following:
$ killall Dock
You’ll notice your Dock will disappear and reappear, and if you check Activity Monitor there will no longer be any Dashboard widgets eating up system memory.
Activity Monitor: If you’d prefer to avoid the command line, you can kill the Dock via the Activity Monitor as well. Simply sort by Process Name, select Dock, and hit the big red “Quit Process” button. Once again, the Dock will disappear and reappear, and with it the Dashboard widgets are no longer loaded.
Apple Script: Finally, you can kill the Dock by writing a simple Apple Script found on Mac OS X Hints. The script is very short and simple, just type or paste the following in Script Editor:
tell application "Dock"
Three methods, same result. Try them out.