| 590 | } |
| 591 | |
| 592 | void DeallocateStorage() { |
| 593 | if (owns_data_) { |
| 594 | for (size_t i = 0; i < NumBuckets(); ++i) { |
| 595 | allocfn_.destroy(allocfn_.address(data_[i])); |
| 596 | } |
| 597 | if (data_ != nullptr) { |
| 598 | allocfn_.deallocate(data_, NumBuckets()); |
| 599 | } |
| 600 | owns_data_ = false; |
| 601 | } |
| 602 | data_ = nullptr; |
| 603 | num_buckets_ = 0; |
| 604 | } |
| 605 | |
| 606 | // Expand the set based on the load factors. |
| 607 | void Expand() { |