Closed seven7777777 closed 3 years ago
That's a bit tricky because the map tries to keep the memory so it doesn't have to allocate any more, but you can do it like this:
robin_hood::unordered_map<uint64_t, uint64_t>().swap(yourMap);
Edit: wait a minute, do you mean it does not deallocate even when you destroy the map?
closing, cannot reproduce
I have a map type robin_hood::unordered_map<uint64_t, uint64_t>, and I insert more than 200 million kv pair into map, but it just does not release any memory to os when I destroy the map object.