@Dan ******
it will be made invalid yes. But if you're on an extension, you signed a piece of paper that said you would information immigrating if your status changed. Just leaving is not sufficient. If you don't cancel it you won't be able to get another long term visa or extension in the future and you'll be hit with a 20,000 baht fine for failing to do so when you signed a paper that said you would.
If you don't plan on returning to Thailand it's fine but if you do then you need to cancel it.
But only if it's an extension. A visa cannot be cancelled.