https://issues.dlang.org/show_bug.cgi?id=15481

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
            Summary|Reducing array.length       |GC profiler thinks reducing
                   |triggers reallocation       |array.length triggers
                   |                            |reallocation

--- Comment #1 from [email protected] ---
This is a bug in the GC profiler. The array is not relocated. You can check by
comparing the pointers:

----
void main()
{
    int[] arr;
    arr.length = 7;
    int* p = arr.ptr;
    arr.length = 6;
    assert(arr.ptr == p); /* passes */
}
----

I'm changing the title of this issue accordingly.

--

Reply via email to