Array Capacity Field
Nick B
nick.barbalich at gmail.com
Thu May 8 01:10:05 PDT 2008
Sean Kelly wrote:
> dsimcha wrote:
>> According to the Phobos docs, std.gc.capacity "Returns capacity (size
>> of the
>> memory block) that p points to the beginning of. If p does not point
>> into the gc
>> memory pool, or does not point to the beginning of an allocated memory
>> block, 0 is
>> returned." I had looked through this before.
>
> Right. And since resizing an interior slice "in place" is typically
> undesirable, this does exactly what you want. If you really want the
> capacity regardless of this however, you can use
> tango.core.Memory.GC.query(), which returns the size of the block even
> for interior pointers.
>
Can someone tell me what "interior pointers" are ?
thanks
Nick
More information about the Digitalmars-d
mailing list