Array Slices and Interior Pointers

Alex Rønne Petersen alex at lycus.org
Tue Dec 11 11:23:02 PST 2012


On 11-12-2012 20:09, Dmitry Olshansky wrote:
> 12/11/2012 4:04 AM, Alex Rønne Petersen пишет:
>> http://xtzgzorex.wordpress.com/2012/12/11/array-slices-and-interior-pointers/
>>
>>
>>
>> Destroy.
>>
>
> Aside from the fact that I can use slices without GC just fine? :)
> The base pointers would then be either counted, released manually or
> implicitly as part of stack unwinding.

Yes, in theory. But that's not how most idiomatic D code written today 
works.

>
> I personally think that managed VMs are going to have to emulate slices
> and pointers as an array object + one or pair of offsets. In fact it
> could be implemented as an abstract object with implementation depending
> on where you did get that pointer from.
>


-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d mailing list