Mistakenly using delete instead of delete []