I have a base class A and a derived class B:
class A { public: virtual f(); }; class B : public A { public: B() { p = new char [100];
Class A should have a virtual destructor. Without that, derive class destructors won't be called.