Using `clear' to clean up lists instead of clean via integration

This commit is contained in:
Felipe Zimmerle 2016-02-17 12:21:05 -03:00
parent 163483e8d4
commit 71970915b1
2 changed files with 4 additions and 6 deletions

View File

@ -38,10 +38,10 @@ Collections::Collections() {
Collections::~Collections() {
for (auto &a : *this) {
this->erase(a.first);
delete a.second;
for (const auto &thing : *this) {
delete thing.second;
}
this->clear();
}

View File

@ -35,9 +35,7 @@ Variables::Variables() {
}
Variables::~Variables() {
for (auto &a : *this) {
this->erase(a.first);
}
this->clear();
}
void Variables::store(std::string key, std::string value) {