Typical security issues in C++: why the GC isn't your enemy

Walter Bright newshound2 at digitalmars.com
Fri Dec 9 02:17:33 UTC 2022


On 12/5/2022 7:13 PM, Tejas wrote:
> People will resort have to resort to `@nogc` stuff when writing performance 
> critical code anyways, so the protection from `D`'s GC will go away in those 
> cases;

The myths about D's GC never seem to die.

D's GC is NEVER, EVER run unless you allocate with the GC. You don't need @nogc 
to disable the GC. Just don't use it. Performance critical code (well-written 
code) does not allocate within the critical sections anyway, so the GC will have 
ZERO effect on it.



More information about the Digitalmars-d mailing list