Smart pointers instead of GC?

Sven Over dlang at svenover.de
Tue Dec 25 06:48:47 PST 2012


> std.typecons.RefCounted!T
>
> core.memory.GC.disable();

Wow. That was easy.

I see, D's claim of being a multi-paradigm language is not false.

> Phobos does rely on the GC to some extent. Most algorithms and 
> ranges do not though.

Running (library) code that was written with GC in mind and 
turning GC off doesn't sound ideal.

But maybe this allows me to familiarise myself more with D. Who 
knows, maybe I can learn to stop worrying and love garbage 
collection.

Thanks for your help!


More information about the Digitalmars-d mailing list