Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Compacts the internal representation of the concurrent vector to reduce fragmentation and optimize memory usage.
template<
typename _Ty,
class _Ax
>
void concurrent_vector<_Ty, _Ax>::shrink_to_fit();
Remarks
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.
Requirements
Header: concurrent_vector.h
Namespace: Concurrency