The D standard library is built on GC, is that a negative or positive?

Steven Schveighoffer schveiguy at gmail.com
Wed Dec 14 03:20:13 UTC 2022


On 12/13/22 9:45 PM, Ali Çehreli wrote:
> On 12/13/22 18:05, H. S. Teoh wrote:
> 
>  > Hmm.  Whatever happened to that proposal for GC-less exceptions?
>  > Something about allocating the exception from a static buffer and
>  > freeing it in the catch block or something?
> 
> I have an errornogc module here:
> 
>    https://code.dlang.org/packages/alid
> 
> I hope it still compiles. :)

FYI, throwing actually uses the GC unless you override the traceinfo 
allocator. Yes, even if it's marked @nogc (functions marked @nogc can 
still call arbitrary C functions that might allocate using the GC).

-steve


More information about the Digitalmars-d mailing list