Wrapping a C-style Array (Pointer + Length) in a Range Interface

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 7 05:33:22 PDT 2015


On Tuesday, 7 July 2015 at 12:29:04 UTC, Rikki Cattermole wrote:
> size_t count;
> AVStream* thePtr;
> AVStream[] array = thePtr[0 .. count];
>
> That should work.

Thanks.

Will that reuse the existing allocate memory at `thePtr` for 
internal storage of the D array? If so how is the GC aware of 
this memory?

Is there any tutorials, reference documentation, etc on these 
matters?


More information about the Digitalmars-d-learn mailing list