Destructors can't be @nogc?

Mike Parker aldacron at gmail.com
Sat Jul 24 02:02:00 UTC 2021


On Friday, 23 July 2021 at 20:24:02 UTC, Jim wrote:

> What is the problem here? Should I not call `destroy`? If so, 
> what should I call instead?

The problem is that you've marked main as `@nogc`, and `destroy` 
is not `@nogc`. Remove the annotation from main and it will 
compile.


More information about the Digitalmars-d-learn mailing list