Queue implementation

why we are using destructor in this program and deleting the array

it is a good practice to destruct the memory once it is out of use.