mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user