I'm not sure how much the twitter app actually hits the network when it is closed, but it does (or can). For example, if you enable it, the app will alert you if you receive a direct message or a reply, for example, even when you have closed the app, so it is capable of accessing twitter in the background even when you have closed it.
Don't know anything about the facebook app.
Last time I was using yahoo messenger, I'm pretty sure it could be closed such that it is not running in the background. Don't know if that is still true.