On Friday, 18 October 2024 at 07:43:47 UTC, Richard (Rikki) Andrew Cattermole wrote:

Sorry for not replying sooner, COVID has not been a fun virus for my mind to have.

When a variable is declared with a struct that needs cleanup, it effectively rewrites the following statements into a try finally:

```d
void main()
{
        S s = 0;
        try
        {
                if (true)
                        return 0;
        }
        finally
                s.~this();
        return 0;
}
```

Thank you for your answer. I also had a minor operation and I am fine now. I hope you are fine too.

SDB@79
  • Scope & Stru... Salih Dincer via Digitalmars-d-learn
    • Re: Scope &... Salih Dincer via Digitalmars-d-learn
      • Re: Sco... Nick Treleaven via Digitalmars-d-learn
        • Re:... Salih Dincer via Digitalmars-d-learn
          • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
    • Re: Scope &... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: Sco... Salih Dincer via Digitalmars-d-learn
        • Re:... Nick Treleaven via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... Salih Dincer via Digitalmars-d-learn

Reply via email to