On Tuesday, 29 April 2014 at 06:13:52 UTC, Andrey wrote:
Ok, thanks a lot..

About dynamic arrays: I haven't found any information about internal representation of the D structures. E.g. do dynamic arrays have reference counter?

Nevermind, I'm gonna use Type2[0] syntax.

D dynamic arrays (better referred to as slices) can be thought of as implmented like

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

They do not track ownership or have any reference counting. If they've been allocated with "new" then the GC will take care of them once there are no remaining references to them.

Reply via email to