xtd 0.2.0
Loading...
Searching...
No Matches

◆ shrink_to_fit()

template<typename type_t >
virtual void xtd::collections::generic::list< type_t >::shrink_to_fit ( )
inlinevirtual

Requests the removal of unused capacity.

Remarks
It is a non-binding request to reduce xtd::collections::generic::list::capacity() to xtd::collections::generic::list::size(). It depends on the implementation whether the request is fulfilled.
If reallocation occurs, all iterators (including the xtd::collections::generic::list::end() iterator) and all references to the elements are invalidated. If no reallocation occurs, no iterators or references are invalidated.