> The solution is simple: nothing is required.
>
> If the constructor throws, the language calls operator
> delete. There's no leak. You can confirm by inspecting the assembly
> of the following program:
>
> struct Foo { Foo(); }; Foo *f() { return new Foo; }
>
> You'll notice that the body of the function f() contains at least
> one call to operator delete().I still prefer smart pointers. Less hassle to think it through if there really isn't a way that an object in one of the base classes isn't destroyed correctly. Especially since the destructor of the class, which throws in the constructor isn't called. Better safe than sorry. Guido _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
