If you have a dynamically created array that is a single array, do you have to manually delete this array with:
delete ... ?
I was taught that any dynamically created array should be deleted, like:
int *array;
array = new int [size];
delete array;
When deleting a dynamically allocated array you should always use delete[]
, and not delete
.