-// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.10 2003/06/11 13:36:54 frog Exp $
+// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.12 2003/06/17 08:07:23 regrain Exp $
//CLEANME#include <vtkByteSwap.h>
#include <stdio.h>
#include <vtkObjectFactory.h>
vtkGdcmReader::~vtkGdcmReader()
{
// FIXME free memory
+ this->FileNameList.clear();
}
//----------------------------------------------------------------------------
strcpy(LocalName, name);
this->FileNameList.push_back(LocalName);
this->Modified();
+ delete[] LocalName;
}
//----------------------------------------------------------------------------
// Since we maintain a list of filenames, when building a volume,
// (see vtkGdcmReader::AddFileName), we additionaly need to purge
// this list when we manually positionate the filename:
- this->FileNameList.empty();
+ this->FileNameList.clear();
this->Modified();
}
///////// The files we CANNOT load are flaged. On debugging purposes
// count the loadable number of files and display thir number:
int NumberCoherentFiles = 0;
- for (std::list<std::string>::iterator FileName = FileNameList.begin();
- FileName != FileNameList.end();
- ++FileName)
+ for (std::list<std::string>::iterator Filename = FileNameList.begin();
+ Filename != FileNameList.end();
+ ++Filename)
{
- if (*FileName != "GDCM_UNREADABLE")
+ if (*Filename != "GDCM_UNREADABLE")
NumberCoherentFiles++;
}
vtkDebugMacro("Number of coherent files: " << NumberCoherentFiles);