A Refcounted Array Type
matovitch via Digitalmars-d
digitalmars-d at puremagic.com
Tue Feb 24 02:13:35 PST 2015
On Tuesday, 24 February 2015 at 10:11:02 UTC, Namespace wrote:
> On Tuesday, 24 February 2015 at 10:08:23 UTC, matovitch wrote:
>> On Tuesday, 24 February 2015 at 09:44:13 UTC, Walter Bright
>> wrote:
>>> On 2/24/2015 1:32 AM, Jonathan M Davis via Digitalmars-d
>>> wrote:
>>>> The issue is that delete is considered @safe by the compiler,
>>>
>>> I thought more people would be interested in how to do a
>>> memory safe reference counted container.
>>
>> This is really interesting ! Thought as a beginner, I am
>> wondering why the counter need to be a pointer ?
>
> That's why:
> ----
> this(this)
> {
> if (count)
> ++*count;
> }
> ----
Hmm, I don't see why that's why... :(
More information about the Digitalmars-d
mailing list