Skip to content

Commit

Permalink
change to filter_block std::unique_ptr support RAII
Browse files Browse the repository at this point in the history
  • Loading branch information
wankai committed Sep 3, 2014
1 parent 5d25a46 commit 19cc588
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions table/block_based_table_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ struct BlockBasedTableBuilder::Rep {
TableProperties props;

bool closed = false; // Either Finish() or Abandon() has been called.
FilterBlockBuilder* filter_block;
std::unique_ptr<FilterBlockBuilder> filter_block;
char compressed_cache_key_prefix[BlockBasedTable::kMaxCacheKeyPrefixSize];
size_t compressed_cache_key_prefix_size;

Expand Down Expand Up @@ -461,7 +461,6 @@ BlockBasedTableBuilder::BlockBasedTableBuilder(

BlockBasedTableBuilder::~BlockBasedTableBuilder() {
assert(rep_->closed); // Catch errors where caller forgot to call Finish()
delete rep_->filter_block;
delete rep_;
}

Expand Down

0 comments on commit 19cc588

Please sign in to comment.