Google's Go & Exceptions
"Jérôme M. Berger"
jeberger at free.fr
Wed Jan 27 10:53:46 PST 2010
Nick Sabalausky wrote:
> ""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) {}
>
- This doesn't exist in C++;
- Outside of constructor, there is no problem because the destructor
is called.
Jerome
--
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100127/dc018325/attachment.pgp>
More information about the Digitalmars-d
mailing list