Proposal: Exceptions and @nogc

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 3 13:53:29 PDT 2017


On 4/3/2017 3:58 AM, Jerry wrote:
> What would happen if the exception gets assigned to a global/TLS variable in a
> catch block. It would be copied to the GC heap?

You'd have to insert code to manually make a clone of the exception object. The 
compiler will complain if you try to leak the exception object.


More information about the Digitalmars-d mailing list