May 2002
Beginner
320 pages
6h 18m
English
It's a common mistake to forget to delete an array:
char *SomePointer = new char[25]; delete SomePointer;
This will delete the zeroth element of SomePointer and leave the other 24 characters of the array taking up space in the heap. Eventually, there will be no more room in the heap, and the program will stop running. This is called a memory leak.
Read now
Unlock full access