A Refcounted Array Type

matovitch via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 24 02:20:25 PST 2015


On Tuesday, 24 February 2015 at 10:16:00 UTC, Ulrich Küttler 
wrote:
> 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.

Ah yes, what an idiot ! Thanks !



More information about the Digitalmars-d mailing list