Hello everybody! I have a question, What happens if you forget to deallocate memory?
I ask this because of a line i read here:
http://www.cprogramming.com/tutorial/lesson6.html
"After deleting a pointer, it is a good idea to reset it to point to 0. When 0 is assigned to a pointer, the pointer becomes a null pointer, in other words, it points to nothing. By doing this, when you do something foolish with the pointer (it happens a lot, even with experienced programmers), you find out immediately instead of later, when you have done considerable damage."
I know this is probably a very newbie question but I've only been learning C++ for a little less than two weeks.
What exactly constitutes "Considerable damage"? Just to the program itself? Or my computer self destructing in a hellish fireball of...not....working...?
Also, If I were to slip up and do something wrong, What can be done to fix this "Considerable damage"?
Anyways, Thanks to anyone who takes the time to read my question and answer it!
(Sorry for what I'm sure is a very silly question.)