Safe reference counting cannot be implemented as a library

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 27 13:29:39 PDT 2015


On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote:
>  Why care about this?
>
>  Even Rust doesn't try to solve this problem...because it isn't 
> really a problem in practice.
>
>  In c++/rust code you use value/unique types 99.9% of the time, 
> and reference counting is only for shared/aliased objects.

I agree with your sentiment that local reference counting is 
seldom needed, but shared reference counting is needed for shared 
cached objects. So shared (atomic) reference counting have a 
common and important use case.

Not sure if shared ref counting is addressed here at all though.


More information about the Digitalmars-d mailing list