Destruct elements of hash tables when removing individual entries from
the hash_table. I think this is the correct solution to PR10507, but I'm not sure since this is a little bit cargo-culted. Howard, please review. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@136546 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
70bbcae9b5
commit
b59b929cc9
@ -1726,6 +1726,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
|||||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
||||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT
|
__hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT
|
||||||
{
|
{
|
||||||
|
__node_traits::destroy(__node_alloc(), __p.operator->());
|
||||||
// current node
|
// current node
|
||||||
__node_pointer __cn = const_cast<__node_pointer>(__p.__node_);
|
__node_pointer __cn = const_cast<__node_pointer>(__p.__node_);
|
||||||
size_type __bc = bucket_count();
|
size_type __bc = bucket_count();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user