ARC in D

Nordlöw via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 4 05:32:23 PST 2017


On Monday, 2 January 2017 at 15:43:22 UTC, eugene wrote:
> hello everyone,
> is there any kind of smart pointers or something in D instead 
> of GC?

Non-atomic RC wrapper type is here

http://dlang.org/phobos/std_typecons.html#.RefCounted

and instantiator for it here

http://dlang.org/phobos/std_typecons.html#.refCounted

It can be combined with containers such as the ones in

https://github.com/economicmodeling/containers

Note that these containers have their copy constructors disabled 
to prevent implicit (C++ style) copying.

Andrei probably knows more about _atomic_ RC.


More information about the Digitalmars-d mailing list