whenever you add attributes to a subclass you have to declare the superclass's destructor as virtual. If you fail to do this, a memory leak is created because the destructer is only freeing the memory allocated to the superclass's attributes, because the superclass's destructor does not know of the existance of the subclass' new attributes.