diff --git a/tests/unit/test_all_types.cpp b/tests/unit/test_all_types.cpp index 0a18e0257..4d3ed0a0a 100644 --- a/tests/unit/test_all_types.cpp +++ b/tests/unit/test_all_types.cpp @@ -112,7 +112,8 @@ void check_read_regular(const std::string& file_name, const std::vector& using reference_type = typename testing::MultiDimVector::type; auto file = File(file_name, File::Truncate); - auto expected = testing::copy(traits::create(dims), dims); + auto raw_expected = traits::create(dims); + auto expected = testing::copy(raw_expected, dims); auto dataspace = DataSpace(dims); auto attr = testing::AttributeCreateTraits::create(file, "dset", dataspace); @@ -139,6 +140,7 @@ void check_read_regular(const std::string& file_name, const std::vector& } testing::ContainerTraits::deallocate(expected, dims); + testing::ContainerTraits::deallocate(raw_expected, dims); } template