Use delete[] instead of delete.