Why does D rely on a GC?

via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 18 12:52:49 PDT 2014


On Monday, 18 August 2014 at 19:43:14 UTC, maik klein wrote:
> My initial question was why D uses the GC for everything.

It isn't supposed to with @nogc?

> Personally it would make more sense to me if D would use the GC 
> as a library. Let the user decide what he wants, something like
>
> shared_ptr(GC) ptr;
> shared_ptr(RC) ptr;

Memory allocation should be in the compiler/runtime to get proper
optimizations. But D has apparently gone with nongc-allocators as 
a library feature.




More information about the Digitalmars-d mailing list