Skip to content

Commit

Permalink
Leaf::clear - delete container elements after clear
Browse files Browse the repository at this point in the history
  • Loading branch information
amtriathlon authored and liversedge committed Oct 16, 2022
1 parent 10c2660 commit d5905d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Core/DataFilter.cpp
Expand Up @@ -1662,10 +1662,10 @@ void Leaf::clear(Leaf *leaf)
delete leaf->lvalue.l;
clear(leaf->series);
delete leaf->series;
foreach (Leaf* l, leaf->fparms) clear(l);
foreach (Leaf* l, leaf->fparms) { clear(l); delete l; }
leaf->fparms.clear();
break;
case Leaf::Compound : foreach (Leaf* l, *(leaf->lvalue.b)) clear(l);
case Leaf::Compound : foreach (Leaf* l, *(leaf->lvalue.b)) { clear(l); delete l; }
delete leaf->lvalue.b;
break;
case Leaf::Conditional : clear(leaf->lvalue.l);
Expand All @@ -1678,7 +1678,7 @@ void Leaf::clear(Leaf *leaf)
case Leaf::Index :
case Leaf::Select : clear(leaf->lvalue.l);
delete leaf->lvalue.l;
foreach (Leaf* l, leaf->fparms) clear(l);
foreach (Leaf* l, leaf->fparms) { clear(l); delete l; }
leaf->fparms.clear();
break;
case Leaf::Float :
Expand Down

0 comments on commit d5905d9

Please sign in to comment.