@gc attribute for bypassign @nogc

Meta via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 28 11:53:35 PDT 2016


On Thursday, 28 July 2016 at 00:23:57 UTC, bitwise wrote:
> While working on a past project(C++), I found this little gem:
>
> void draw() {
>     Font* f = new Font("arial.ttf", 16);
>     drawText(f, "hello world");
> }

It sounds like -vgc and --profile=gc are exactly what you want. 
@nogc is meant to *guarantee* that the GC will not be called 
within a function or any other functions called by that function. 
Taking that guarantee away makes it effectively useless.


More information about the Digitalmars-d mailing list