Drawbacks of exceptions being globally allocated

Paul Backus snarwin at gmail.com
Sat Aug 14 23:14:51 UTC 2021


On Saturday, 14 August 2021 at 15:58:17 UTC, Tejas wrote:
> If you're willing to help further, would you please tell me why 
> there is a GC allocation in the code below that uses 
> ```emplace```? Will such code truly work if GC is never linked 
> in the program?

https://run.dlang.io/is/XEc2WJ

```
onlineapp.d(26): Error: `@nogc` function `D main` cannot call 
non- at nogc function `core.memory.GC.stats`
```

Looks like `GC.stats` uses the GC.


More information about the Digitalmars-d-learn mailing list