On 5/20/20 10:50 PM, data pulverizer wrote:
how do you allocate/free memory without using the garbage collector?

Use C malloc and free.

Does allocating and freeing memory using `GC.malloc` and `GC.free` avoid D's garbage collector?

No, an allocation can trigger a collection. D does not have a scheduled GC, it basically runs the GC when it can't allocate any more memory from it's pools before it tries to get more from the OS.

I *think* that @nogc is supposed to mean "Be able to run this without a GC implemented", not that no collections will run.

-Steve

Reply via email to