The GC (agian)
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Tue Nov 23 14:02:34 UTC 2021
On Tuesday, 23 November 2021 at 13:46:28 UTC, Imperatorn wrote:
> I get the feeling that some ppl still believe the GC sneaks in
> some backdoor and says hello
Well, it "does", unless you only use the GC for initialization,
in which case you are good.
The GC also has to scan non-GC memory if that memory can point
back to GC-memory.
If you want to avoid this, you basically have to reason about
lifetimes with no compiler support at all.
At that point manual memory management with RAII/RC becomes less
brittle and the GC becomes more of a liability than an advantage.
More information about the Digitalmars-d
mailing list