top | item 10137450

(no title)

boost_ | 10 years ago

this is a reply to vvanders comment, for some reason i cant reply directly to his comment, so ill reply to myself..

they didn’t really "fix" it, instead they added a method called std::vector<T>::shrink_to_fit() which i'll admit its not the most elegant way, but it works.

what it does is, it resizes the capacity() to be the same as the size(), deallocating all the extra memory.

discuss

order

jeremiep|10 years ago

About the reply issue: its simply HN's mechanism to prevent flamewars from escalading quickly. The deeper a comment is the longer you have to wait after it is posted to be able to reply to it.