Releasing Dynamically Allocated Built-In Arrays with delete 
To deallocate the memory to which
gradesArray points, use the statement
delete  gradesArray;
If the pointer points to a built-in array of objects, the statement first calls the destructor for every object in the array, then deallocates the memory. If the preceding statement did not include the square brackets (
gradesArray pointed to a built-in array of objects, the result is undefined—some compilers call the destructor only for the first object in the array. Using delete or delete  on a nullptr has no effect.
Common Programming Error 10.3
Using delete instead of delete ...