On Sat, 15 Jan 2011 12:16:32 -0500, Steven Schveighoffer
<[email protected]> wrote:
On Fri, 14 Jan 2011 20:54:39 -0500, %u <[email protected]> wrote:
What you really want is for IFTI to strip down const/immutable on
arrays and
basic types. I think it's a bugzilla bug somewhere, if not it's
definitely been
discussed on the phobos mailing list.
Ah, all right then, nice!
Since 2.041, this cannot happen. A resize of a slice where data will
be
overwritten from the original array always results in a reallocation.
So I assume the same is true if you try to resize a slice of
non-GC-managed memory
(even if it won't overwrite anything), correct? That's comforting to
know, thank
you! :)
A resize of non-GC-managed memory will always reallocate on the GC,
because it has no information on it.
Actually, I'll go one further: A resize of non-GC-array memory (memory
allocated in any way other than new T[]) will not resize in place, simply
because the information to allow resizing doesn't exist. This change is
more recent however, I think circa 2.048?
-Steve