Destructors can't be @nogc?
Jim
jim at mailinator.com
Sat Jul 24 09:45:01 UTC 2021
On Saturday, 24 July 2021 at 02:02:00 UTC, Mike Parker wrote:
> The problem is that you've marked main as `@nogc`, and
> `destroy` is not `@nogc`. Remove the annotation from main and
> it will compile.
In that case, what should we use to check functions called from
`main` are not using the garbage collector?
Because it seems like we can't use classes with `@nogc`. We can
write `.deinit()` for all our classes but what about the existing
ones?
More information about the Digitalmars-d-learn
mailing list