_d_arrayshrinkfit

fnvoid _d_arrayshrinkfit(Tarr: T[], T)(Tarr arr, bool isshared) @trusted

Shrink the "allocated" length of an array to be the exact size of the array.

It doesn't matter what the current allocated length of the array is, the user is telling the runtime that he knows what he is doing.

Parameters

Tthe type of the elements in the array (this should be unqualified)
arrarray to shrink. Its .length is element length, not byte length, despite void type
issharedtrue if the underlying data is shared