Smart pointers instead of GC?

Frank Bauer y at z.com
Sat Feb 1 18:31:24 PST 2014


On Sunday, 2 February 2014 at 02:05:16 UTC, Manu wrote:
> On 2 February 2014 00:33, Frank Bauer <x at y.com> wrote:
>> ARC would be a plus for heavily interdependent code. But it 
>> doesn't beat
>> unique_ptr semantics in local use that free their memory 
>> immediately as
>> they go out of scope or are reassigned.
>
>
> Why wouldn't ARC do this?

Because in a local scope you could decide when to free the object 
at compile time (i.e. end of scope) and not drag a reference 
count around when it is not necessary?


More information about the Digitalmars-d mailing list