Memtables should be deleted appropriately in the unit test.
Summary: Memtables should be deleted appropriately in the unit test. Test Plan: Reviewers: CC: Task ID: # Blame Rev:
This commit is contained in:
parent
45a2f2d8d3
commit
96bc3ec297
@ -69,7 +69,7 @@ static std::string PrintContents(WriteBatch* b) {
|
||||
} else if (count != WriteBatchInternal::Count(b)) {
|
||||
state.append("CountMismatch()");
|
||||
}
|
||||
mem->Unref();
|
||||
delete mem->Unref();
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@ -374,10 +374,10 @@ class MemTableConstructor: public Constructor {
|
||||
memtable_->Ref();
|
||||
}
|
||||
~MemTableConstructor() {
|
||||
memtable_->Unref();
|
||||
delete memtable_->Unref();
|
||||
}
|
||||
virtual Status FinishImpl(const Options& options, const KVMap& data) {
|
||||
memtable_->Unref();
|
||||
delete memtable_->Unref();
|
||||
memtable_ = new MemTable(internal_comparator_, table_factory_);
|
||||
memtable_->Ref();
|
||||
int seq = 1;
|
||||
@ -1289,7 +1289,7 @@ TEST(MemTableTest, Simple) {
|
||||
}
|
||||
|
||||
delete iter;
|
||||
memtable->Unref();
|
||||
delete memtable->Unref();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user