make destructor of class AbstractMessage virtual