My program stops executing at the line where I delete dynamically allocated memory in a function of a class.
delete [] array;
array is a member of the class and a pointer to a char array. I don't get an error message when I compile it, but if I debug it, it stops at that line and says that there's an exception. What am I doing wrong?