Shouldn't you be deleting the message1 only since that is the pointer to the data in the first place?


Both those lines do the same thing so you are trying to delete memory that has already been...