It all rather depends on who you're diving with and what the agreement was before you went in.
If I'm instructing, then no matter what I'll stay with them, no exceptions.
If, like sunday, I was diving with a close friend, I got cold before he did, so waved cheerio, knowing he was going to be...