Truth be told, computers (and by extension, digital cameras) do not erase anything. When you delete, erase or even reformat a card, the images are still there. So doing any of those actions really doesn't affect the quality of the images. It doesn't go through the entire card and reset every memory location back to 0. All the 1's and 0's that make up the images remain in place. You will just need recovery software to retrieve the images if you want them.
All memory devices use a bit of the memory for 'housekeeping'. This means the memory is used to 'keep notes' as it were. When you delete an image, the 'notes' are changed so the computer or camera can now re-use that memory. As long as you don't take another image, all the deleted images are still there. Once you start taking more images, the memory locations where the deleted images are get changed.
This is why, if you have images on a card that you need to recover due to card error or file corruption, or if you accidently delete an image or reformat the card, you want to set the card aside and not use it until you recover the image.