[Off-Topic] John Carmack's point of view on GC and languages like JavaScript
wjoe
invalid at example.com
Mon Aug 8 15:51:11 UTC 2022
On Monday, 8 August 2022 at 15:25:40 UTC, Paul Backus wrote:
> This is possible using the `GC` API in `core.memory`:
>
> ```d
> {
> import core.memory: GC;
>
> GC.disable();
> scope(exit) GC.enable();
>
> foreach (...)
> // hot code goes here
> }
> ```
>
> ```d
> void load_assets()
> {
> import core.memory: GC;
>
> // allocate, load stuff, etc..
> GC.collect();
> }
> ```
Yes, but more typing and it requires an import.
No intention to complain; just saying convenience and such. :)
More information about the Digitalmars-d
mailing list