[TD]fix #9265 - memory leak in cosmetic features

This commit is contained in:
wandererfan
2023-07-17 14:23:22 -04:00
committed by WandererFan
parent e82fd8d3fd
commit b1e03c2292
3 changed files with 36 additions and 8 deletions

View File

@@ -78,6 +78,9 @@ void PropertyCenterLineList::setValue(CenterLine* lValue)
void PropertyCenterLineList::setValues(const std::vector<CenterLine*>& lValue)
{
aboutToSetValue();
for (auto& value : _lValueList) {
delete value;
}
_lValueList.resize(lValue.size());
for (unsigned int i = 0; i < lValue.size(); i++)
_lValueList[i] = lValue[i];