fix memory leak on PVStructure::removeField

This commit is contained in:
Marty Kraimer
2011-04-27 12:06:44 -04:00
parent 95ae684d3d
commit e873bdd0b6
4 changed files with 83 additions and 15 deletions

View File

@@ -192,6 +192,7 @@ namespace epics { namespace pvData {
}
Structure *structure = const_cast<Structure *>(getStructure().get());
structure->removeField(indRemove);
delete origPVFields[indRemove];
delete[] pImpl->pvFields;
pImpl->pvFields = newPVFields;
pImpl->numberFields = newLength;