D will copy the original content if a slice expands, but is the following 
behavior
implementation specific, or part of the specification?

        auto a = [0,1,2];
        auto b = a[0..2];
        a.length = 2; // is a[3] already marked for collection by the gc?
        assert(a.ptr == b.ptr);
        b.length += 1; // as b cannot reuse it even though noone is using it
        assert(a.ptr == b.ptr); // ooops, fails.. b is reallocated

Reply via email to