@gc attribute for bypassign @nogc
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jul 24 17:05:16 PDT 2016
On Sunday, 24 July 2016 at 23:30:37 UTC, bitwise wrote:
> On Sunday, 24 July 2016 at 23:10:18 UTC, Dicebot wrote:
>> @nogc functions must never ever trigger GC collection cycle,
>> not under any possible circumstances. Otherwise the attribute
>> serves no purpose.
>
> The fact that you can use malloc() in a @nogc function
> invalidates this argument.
nope. `malloc()` has nothing to do with garbage collection.
what `@nogc` means is "i won't use built-in allocator with
garbage collection in this code", not "i won't do any memory
allocations in this code".
More information about the Digitalmars-d
mailing list