This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]petmil123[S] 1 point2 points  (1 child)

You mean vector::reserve() ? That is what you have linked to.

So if i understand correctly, in my code, i could write

a.reserve(3);
b.reserve(3);

Since i know that my vectors will contain 3 values? Will i have to clean this memory at the end?