What should happen here?

Elronnd elronnd at elronnd.net
Sat Sep 25 19:28:46 UTC 2021


On Saturday, 25 September 2021 at 17:46:01 UTC, Steven 
Schveighoffer wrote:
>> P.P.S. Do not conflate class destructors with struct 
>> destructors. The latter follow RAII rules, the former does not.
>
> Actually, this is not strictly true. Structs allocated on the 
> heap do not follow RAII rules, and stack allocations of structs 
> are a completely different issue.

Indeed; additionally, 'scope c = new Class()' _does_ follow RAII.


More information about the Digitalmars-d mailing list