@nogc and Phobos

Mike Parker aldacron at gmail.com
Sat Mar 11 13:23:52 UTC 2023


On Saturday, 11 March 2023 at 12:04:25 UTC, bomat wrote:

> So my question is:
> Is Phobos essentially incompatible to `@nogc`?
> Or is there a trick for mixing GC code with non-GC code that I 
> don't know?
>
> I'm assuming the second, for if the first was true I'd say that 
> D would be pretty much useless when combined with non-D libs...

Any function annotated with `@nogc` can only call other `@nogc` 
functions, but they can be called by *any* function. So it won't 
affect your use of the GC or Phobos in that regard.

Or is there a specific problem you've encountered?


More information about the Digitalmars-d-learn mailing list