From 4b721fbde0b6a623968987b52a9500471242cfcb Mon Sep 17 00:00:00 2001 From: Hope Casey-Allen Date: Wed, 19 Sep 2018 20:51:45 -0700 Subject: Destroy arena at end of benchmark to not leak memory --- test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/cpp/microbenchmarks') 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); -- cgit v1.2.3