Closed yiguolei closed 1 year ago
There was an issue indeed when the object construction failed with an exception (for example std::bad_alloc). That is issue #117. I just checked in a change to fix this. So if you get the current latest version from the repo, phmap should be fully exception safe. Thanks!
Thanks a lot
I am using phmap to implement some operators like CountDistinct in Apache Doris. But I am using our database's own allocator to allocate memory. The allocator will throw exception if memory not sufficient in order to cancel the query to avoid OOM.
I am not sure if phmap is exception safe. For example, if throws exception during call phmap::emplace or other methods, is there memory leak in such cases?