Fix valgrind failure due to memory leaks
Summary: Test cases for IsBottommostLevel function create FileMetaData objects which were not getting deleted in the destructor. Test Plan: Valgrind check on compaction_picker_test Reviewers: yhchiang, igor, sdong Subscribers: rven, kradhakrishnan, IslamAbdelRahman, dhruba, anthony Differential Revision: https://reviews.facebook.net/D47463
This commit is contained in:
parent
a70d08ec07
commit
c58bac701c
@ -70,6 +70,12 @@ class CompactionPickerTest : public testing::Test {
|
|||||||
void DeleteVersionStorage() {
|
void DeleteVersionStorage() {
|
||||||
vstorage_.reset();
|
vstorage_.reset();
|
||||||
files_.clear();
|
files_.clear();
|
||||||
|
for (uint32_t i = 0; i < input_files_.size(); ++i) {
|
||||||
|
for (uint32_t j = 0; j < input_files_[i].files.size(); ++j) {
|
||||||
|
delete input_files_[i].files[j];
|
||||||
|
}
|
||||||
|
input_files_[i].files.clear();
|
||||||
|
}
|
||||||
input_files_.clear();
|
input_files_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user