Memory Leak in the following code
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
vtkDataReader.cxx has a memory leak here: 'decoded' is allocated but never deleted. Line 1749 of the git version.
else
{
// read in newline
vtkStdString s;
my_getline(*(this->IS), s);
for (int i=0; i<numTuples; i++)
{
for (int j=0; j<numComp; j++)
{
my_getline(*(this->IS), s);
int length = static_cast<int>(s.length());
char* decoded = new char[length + 1];
int decodedLength = this->DecodeString(decoded, s.c_str());
vtkStdString decodedStr(decoded, decodedLength);
((vtkStringArray*)array)->InsertNextValue(decodedStr);
}
}
}
}