If you want to quickly free up the memory being used by all your Dashboard widgets, simply restart the Dock application. Open /Applications -> Utilities -> Activity monitor, and find the application named Dock in the list. Select it and then click Quit Process in the toolbar. In the sheet that comes up, click Quit.
The Dock will quit, unloading all its Dashboard widgets. Then the OS will immediately restart the Dock. The Dock then will not load its widgets again until you activate Dashboard again and open a widget.
[robg adds: You could also use the Terminal and type killall Dock for the same result. The effect is the same as manually closing all your widgets, but if you've got a bunch open, this is definitely the faster "sledgehammer" solution. As noted in other hints and comments, the amount of RAM used by Dashboard isn't necessarily huge, so don't expect a large jump in available memory.
You can see how much real RAM your open widgets are using by launching Activity Monitor and entering 'dashboard' in the Filter box at the top of the window. In the resulting list, look at the Real Memory column to see your widgets' memory usage (my five open widgets are using about 45MB of RAM).]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050730103745353