libstdc++: [_Hashtable] Optimize destructor
Hashtable destructor do not need to call clear() method that in addition to destroying all nodes also reset all buckets to nullptr. libstdc++-v3/ChangeLog: * include/bits/hashtable.h (~_Hashtable()): Replace clear call with a _M_deallocate_nodes call.
This commit is contained in:
parent
c3d1153bc0
commit
6ef8881772
1 changed files with 1 additions and 1 deletions
|
@ -1664,7 +1664,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
"Cache the hash code or qualify your functors involved"
|
||||
" in hash code and bucket index computation with noexcept");
|
||||
|
||||
clear();
|
||||
this->_M_deallocate_nodes(_M_begin());
|
||||
_M_deallocate_buckets();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue