Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix leak in test code.
Browse files Browse the repository at this point in the history
1uc committed Dec 2, 2024
1 parent 17d8dfd commit 8621871
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unit/test_all_types.cpp
Original file line number Diff line number Diff line change
@@ -112,7 +112,8 @@ void check_read_regular(const std::string& file_name, const std::vector<size_t>&
using reference_type = typename testing::MultiDimVector<base_type, traits::rank>::type;

auto file = File(file_name, File::Truncate);
auto expected = testing::copy<reference_type>(traits::create(dims), dims);
auto raw_expected = traits::create(dims);
auto expected = testing::copy<reference_type>(raw_expected, dims);

auto dataspace = DataSpace(dims);
auto attr = testing::AttributeCreateTraits::create<base_type>(file, "dset", dataspace);
@@ -139,6 +140,7 @@ void check_read_regular(const std::string& file_name, const std::vector<size_t>&
}

testing::ContainerTraits<reference_type>::deallocate(expected, dims);
testing::ContainerTraits<Container>::deallocate(raw_expected, dims);
}

template <class Container>

0 comments on commit 8621871

Please sign in to comment.