3 ms·
Is the GC mandatory in D? I was under the impression some time ago that D could run GC-free, but the standard library still widely used GC. Did I just misunde
by loeg 10y ago
Is the GC mandatory in D? I was under the impression some time ago that D could run GC-free, but the standard library still widely used GC. Did I just misunderstand?
- steveklabnik 10y agoIn my understanding, you're overall correct, but they've also been working on reducing that need, making more and more of it work without a GC.
- WalterBright 10y agoCurrently working on making the Exception handling system usable without the GC. Expect it soon.
- steveklabnik 10y agoGreat! (and, congrats on the re-licensing.)
- petre 10y agoYou can go easier on the GC or avoid it altogether. See this article and the discussion: https://news.ycombinator.com/item?id=13914308 https://news.ycombinator.com/item?id=13914308
- mhh__ 10y agoYou can tag a block @nogc, if you just need to avoid it for a specific part of your program. This can be done with the whole program, but quite a lot of the standard library requires the GC. I should point out that the GC has no problems that affect day to day usage, the stuff people complain about is when it's running for a while (it's conservative atm so it leaks).
- loeg 10y agoIf you can tag the entire program @nogc, great.