pointers, assignments, Garbage Collection Oh My?

Namespace rswhite4 at googlemail.com
Wed Jul 10 10:45:25 PDT 2013


> A string in D, and all arrays, is a struct looking like this:
>
> struct Array (T)
> {
>     T* ptr;
>     size_t length;
> }

I always thought it looks like this:

struct Array(T) {
     T* ptr;
     size_t length, capacity;
}


More information about the Digitalmars-d-learn mailing list