Google's Go & Exceptions

Nick Sabalausky a at a.a
Tue Jan 26 17:37:31 PST 2010


""Jérôme M. Berger"" <jeberger at free.fr> wrote in message 
news:hjnrhv$1l0k$1 at digitalmars.com...
>Throwing exception inside constructors should be avoided because
>then the destructor is never called and you risk leaking like crazy.

That's a risk outside of constructors too. Hence:

scope(failure) {}





More information about the Digitalmars-d mailing list