The difference between “delete” and “delete []” is the former is used for a pointer only while the latter is used for pointers to an array. Take for example the code below:

if you use “delete” on a pointer to an array it will cause a memory leak, so make sure you use the correct “delete”.