DataValidatorGroup: fix memory leak, delete all DataValidator's in destructor

This commit is contained in:
Beat Küng 2016-11-01 07:51:00 +01:00 committed by Lorenz Meier
parent b870f92e1c
commit ded3b1a690
1 changed files with 6 additions and 0 deletions

View File

@ -60,6 +60,12 @@ DataValidatorGroup::DataValidatorGroup(unsigned siblings) :
DataValidatorGroup::~DataValidatorGroup() DataValidatorGroup::~DataValidatorGroup()
{ {
while (_first) {
DataValidator* next = _first->sibling();
delete (_first);
_first = next;
}
}
} }