aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks
diff options
context:
space:
mode:
authorGravatar Hope Casey-Allen <hcaseyal@google.com>2018-09-19 20:51:45 -0700
committerGravatar Hope Casey-Allen <hcaseyal@google.com>2018-09-19 20:51:45 -0700
commit4b721fbde0b6a623968987b52a9500471242cfcb (patch)
tree8e630c6f01eacb42104ccccbffc0c0c781d2153c /test/cpp/microbenchmarks
parent29d9489ea9fa4b6249c3243bc122a65746c928ac (diff)
Destroy arena at end of benchmark to not leak memory
Diffstat (limited to 'test/cpp/microbenchmarks')
-rw-r--r--test/cpp/microbenchmarks/bm_chttp2_hpack.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc
index 741825cada..528cabd0e3 100644
--- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc
+++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc
@@ -475,6 +475,8 @@ static void BM_HpackParserParseHeader(benchmark::State& state) {
arena = gpr_arena_create(kArenaSize);
}
}
+ // Clean up
+ gpr_arena_destroy(arena);
for (auto slice : init_slices) grpc_slice_unref(slice);
for (auto slice : benchmark_slices) grpc_slice_unref(slice);
grpc_chttp2_hpack_parser_destroy(&p);