Destroy arena at end of benchmark to not leak memory

pull/16629/head
Hope Casey-Allen 6 years ago
parent 29d9489ea9
commit 4b721fbde0
  1. 2
      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);

Loading…
Cancel
Save