Proposal 2: Exceptions and @nogc

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Apr 9 17:48:39 PDT 2017


On 4/9/2017 5:12 PM, Andrew Godfrey wrote:
> Is it general?

No.

> If not, what is special about Exceptions that makes it work here?

It only works because all ways that such exceptions can leak are controlled. D 
doesn't have copy construction for making copies of class references. You 
couldn't use this scheme, for example, to stuff class references into struct fields.



More information about the Digitalmars-d mailing list