Will the destructor of the base class be called if an object throws an exception in the constructor?
Yes. The rule is that every object whose constructor has finished successfully will be destructed upon exception. E.g:
class A {
public:
~A() {}
};
class B : public A {
public:
B() { throw 0; }
~B() {}
};
~A() is called. ~B() is not called;
EDIT: moreover, suppose you have members:
struct A {
A(bool t) { if(t) throw 0; }
~A() {}
};
struct B {
A x, y, z;
B() : x(false), y(true), z(false) {}
};
What happens is: x is constructed, y throws, x is destructed (but neither y nor z).