Mac: Jettison is a handy Mac utility that runs in the background and automatically unmounts external drives when you put your computer to sleep.
While it's usually OK to yank out USB drives without ejecting them, you probably shouldn't get in the habit. OS X still uses write caching on external drives when the system is asleep, so you run the risk of corrupting data if you close your MacBook and pull out an SD card or external hard drive. With Jettison enabled, your computer will force eject all of your drives immediately upon sleeping, and will even remount them automatically when you return.
I constantly forget to unplug everything before closing my computer, so Jettison saves me the trouble of waking the machine up, keying in my login password, and ejecting the drives manually. If you have the same problem, Jettison can solve it for $1.99.
Jettison [Mac App Store]