A Refcounted Array Type

via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 24 02:15:59 PST 2015


On Tuesday, 24 February 2015 at 10:13:36 UTC, matovitch wrote:
> On Tuesday, 24 February 2015 at 10:11:02 UTC, Namespace wrote:
>> On Tuesday, 24 February 2015 at 10:08:23 UTC, matovitch wrote:
>> That's why:
>> ----
>> this(this)
>> {
>>    if (count)
>>        ++*count;
>> }
>> ----
>
> Hmm, I don't see why that's why... :(

The counter is shared amount all "copies" of the array.


More information about the Digitalmars-d mailing list