Does reserve() preallocate for futher appends too?
bachmeier
no at spam.net
Mon Mar 1 21:49:38 UTC 2021
On Monday, 1 March 2021 at 03:07:19 UTC, Jack wrote:
> isn't clear for me if reserve() does preallocate memory so that
> that operator like arr ~= x can use previously allocate memory
> by reserve() or it's just used in slices like b = arr[x .. y]?
You may potentially find this article of use:
https://dlang.org/articles/d-array-article.html
More information about the Digitalmars-d-learn
mailing list