I've noticed that when I close my macbook (snow leopard) some apps are still running, namely: the grooveshark desktop app and VLC.
Just wondering if there is a setting I missed somewhere.
Does it not turn off the screen and go into sleep mode? When you say apps are still running, does your computer keep playing a movie or music when you close the screen?
Usually it takes upto 30 seconds to turn off the apps, I don't know how it works on the low level but to my understanding it just saves the state of the apps in the memory so when you open the lid, the apps launch quickly.
Closing the lid on your MacBook should be putting it to sleep. Sleep suspends the entire application level, so when the system is asleep there will be no activity from any applications on your system.
You'll know your MacBook is asleep because the screen will turn off, the fans will tun off, and the hard drive will spin down. As @Muhammad mentioned, this can take a few seconds. Once sleep is complete, your power light will start pulsating like the slow heartbeat of a hibernating mammal.
You can demo this for yourself and test to make sure sleep is working by manually putting the computer to sleep with the display still open. Go to the Apple menu and choose Sleep, or hit command+option+eject.
On my 3-year old MacBook Pro, the system suspends and the display turns off after just a few seconds, followed soon after by the hard drives spinning down, but the fan keeps running until the processor has cooled off—then the power light starts pulsating.
I don't regularly use Grooveshark or VLC, so I'm not sure how they're designed to behave. When you tell your computer to go to sleep, System Events sends a message to every app notifying them of this, which is why iChat logs off and iTunes stops playing when you close your MacBook. If VLC and Grooveshark are ignoring this message and preventing sleep, then you should report that bug to the developers (after making sure they are up-to-date) and then make sure to quit (or pause) them manually before closing your MacBook.