fix double releasing: base class dtor will be called when destroying derived class