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:
Mayank Pundir 2015-09-23 17:24:20 -07:00
parent a70d08ec07
commit c58bac701c

View File

@ -70,6 +70,12 @@ class CompactionPickerTest : public testing::Test {
void DeleteVersionStorage() {
vstorage_.reset();
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();
}