delete messages in the destructor