Reducing std::unordered_map memory footprint after emptying it

Viewed 613

Suppose I have an std::unordered_map object to which I add some elements and then remove them. Other than constructing a new object to replace the old one, is there a way to force reducing the map object's memory footprint, similar to std::vector::shrink_to_fit()?

1 Answers
Related