Re: Go ahead. Stop programming. This ensures you from any mistakes.




C++ destructors are called during exception stack unwinding. No finally
block is ever needed.

I speak about dynamically created objects. Your RAII does not apply to
heap-allocation.

byte* buf = allocatemesomedata(size); // will this be freed in case of
exception?
AbstractClass o = new Subclass(); // will the destructor of 'o' be called
automatically?

Anyway, RAII dow not address the problem of partially created objects.


.


Loading