I've been watching some high level player's replays on SC2, and I noticed that when one opponent knows he'll lose, he just leaves the game.

Is that considered a victory for the player who did not leave? Is it the same *kind of victory* as completely destroying the enemy (without him leaving), or is there some kind of difference (stats-wise)?