diff options
Diffstat (limited to 'absl/container/internal/container_memory_test.cc')
-rw-r--r-- | absl/container/internal/container_memory_test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/container/internal/container_memory_test.cc b/absl/container/internal/container_memory_test.cc index c1e57834..90d64bf5 100644 --- a/absl/container/internal/container_memory_test.cc +++ b/absl/container/internal/container_memory_test.cc @@ -25,6 +25,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "absl/base/no_destructor.h" #include "absl/container/internal/test_instance_tracker.h" #include "absl/meta/type_traits.h" #include "absl/strings/string_view.h" @@ -58,7 +59,7 @@ TEST(Memory, AlignmentSmallerThanBase) { } std::map<std::type_index, int>& AllocationMap() { - static auto* map = new std::map<std::type_index, int>; + static absl::NoDestructor<std::map<std::type_index, int>> map; return *map; } |