DIP44: scope(class) and scope(struct)

Tobias Pankrath tobias at pankrath.net
Tue Aug 27 03:00:49 PDT 2013


On Monday, 26 August 2013 at 21:31:40 UTC, H. S. Teoh wrote:


> But don't you still need to manually cleanup in the case of ctor
> failure? AFAIK, the dtor is not invoked on the 
> partially-constructed
> object if the ctor throws.

I didn't knew this. You are right, that this brakes my RAII 
scheme and something to work around this would be helpful. That's 
actually quite the pitfall.


More information about the Digitalmars-d mailing list