Export (0) Print
Expand All

concurrent_vector::shrink_to_fit Method

Compacts the internal representation of the concurrent vector to reduce fragmentation and optimize memory usage. This method is not concurrency-safe.

void shrink_to_fit();

This method will internally re-allocate memory move elements around, invalidating all the iterators. shrink_to_fit is not concurrency-safe. You must ensure that no other threads are invoking methods on the concurrent vector when you call this function.

Header: concurrent_vector.h

Namespace: concurrency

Show:
© 2014 Microsoft