Scope & Structs
Salih Dincer
salihdb at hotmail.com
Sat Oct 19 11:46:20 UTC 2024
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 at 79
More information about the Digitalmars-d-learn
mailing list