I can confirm the same behaviour on my Wife's iMac w/4GB of RAM. Safari Web Process would often take >3GB causing the machine to swap heavily and become un-responsive.
We both regularily have 10+ tabs open at any time (I am much worse, often having 15+ in each Safari Window and 2 - 3 Safari Windows open at all times). Yet it happens to her quite often (not 100% of the time), but never to me. Hmmm.... We are both running Lion with the same version of Safari.
This morning I spent a bit of time investigating by doing the following:
- I forced the Safari Web Content Process to quit and watched it in Activity Monitor as it restarted
- 1 by 1 I clicked on her tabs to reload the page content and watched the memory consumption of the Safari Web Content Process. It seemed to go up ~50MB per tab, some pages took a few seconds to stabilize, others seemed to go up or down by between 5MB - 10MB every few seconds as the page sat idle (likely some AJAX processing or other dynamic content is causing this). While some of them fluctuated, it wasn't constant growth, just a small up and down in the allocation of memory.
- When I got the her Yahoo Mail page, the memory increased as usual, but then grew by ~10MB every few seconds and never stopped. Clicking on a folder within her mail caused it to jump between 50MB - 100MB and then contiune to climb by ~10MB every few seconds. Leaving that page open in a tab (active or not doesn't matter) will quickly consume all available memory on the machine and cause it to start swapping and become un-responsive.
So, I would recommend following the steps above to identify if you too have a particular web page(s) that is causing the problem (or making it worse, depending on your perspective on this issue).
Based on what I've seen personally, I wouldn't categorize this as a "Memory Leak" in Safari. Closing the tab with Yahoo Mail not only stops the continual growth, but the memory allocation of the Safari Web Content Process drops. If Safari was leaking, the memory would not be released until the process was ended.
Just my 2 cents, I hope this helps some of you to narrow down what is causing this. For my wife the solution is simple, close Yahoo when she's done checking her mail. No more beachball, no more thrashing hard drive, no more slow machine.
Good Luck!