

Deep C and C++: How much do you really understand? - sthatipamala
http://www.pvv.org/~oma/DeepC_slides_oct2011.pdf

======
willvarfar
A(int sz) { sz_ = sz; v = new B[sz_]; }

~A() { delete v; }

Surely if the allocation of v fails, the destructor will delete some wrong
memory pointed at by an unintialised v?

The pain of not using initialiser lists?

~~~
DerekL
No. If the allocation fails, it throws an exception, and the destructor isn't
called.

------
duncan_bayne
I thought 'excellent' ... then saw [scribd] and thought 'meh'.

