aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDominic Hamon <dominichamon@users.noreply.github.com>2021-06-03 16:08:00 +0100
committerGitHub <noreply@github.com>2021-06-03 16:08:00 +0100
commitd17ea665515f0c54d100c6fc973632431379f64b (patch)
treec112cda24ec0ddd1df2b814a7ad0e7ad2f1b1414 /test
parent32cc60710761039d545612ecfa70b671a4d7e58e (diff)
downloadgoogle-benchmark-d17ea665515f0c54d100c6fc973632431379f64b.tar.gz
Fix leak in test, and provide path to remove leak from library (#1169)
* Fix leak in test, and provide path to remove leak from library * make doc change
Diffstat (limited to 'test')
-rw-r--r--test/benchmark_gtest.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/benchmark_gtest.cc b/test/benchmark_gtest.cc
index cbbf48b..14a885b 100644
--- a/test/benchmark_gtest.cc
+++ b/test/benchmark_gtest.cc
@@ -143,6 +143,7 @@ TEST(AddCustomContext, Simple) {
testing::UnorderedElementsAre(testing::Pair("foo", "bar"),
testing::Pair("baz", "qux")));
+ delete global_context;
global_context = nullptr;
}
@@ -155,6 +156,7 @@ TEST(AddCustomContext, DuplicateKey) {
EXPECT_THAT(*global_context,
testing::UnorderedElementsAre(testing::Pair("foo", "bar")));
+ delete global_context;
global_context = nullptr;
}