[Insight-users] Problem with namegeneratortype and memory leads

Fer no se ferlomi at hotmail.com
Mon Jun 28 03:22:27 EDT 2010



Hi, I have a problem with this type of pointer and I dont know how I can solve it. My function is:

    typedef signed short PixelType;                               
    typedef itk::Image< PixelType, Dimension >  ImageType;        //Tipo de imagen
    typedef itk::ImageSeriesReader< ImageType > ReaderTAC;
    typedef itk::GDCMSeriesFileNames NamesGeneratorType;        //Para tener en un vector todos los archivos

    NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();
    nameGenerator->SetInputDirectory( "C:\\patient" );

    const ReaderTAC::FileNamesContainer filenames = nameGenerator->GetInputFileNames();
    ReaderTAC::FileNamesContainer::const_iterator FileItr = filenames.begin();
    
    for ( ;FileItr!=filenames.end();FileItr++)
    {
       //Make something
    }

The probem is that I have memory leads: 

Detected memory leaks!
Dumping objects ->
{12053} normal block at 0x02A33F78, 12 bytes long.
 Data: <x?  x?      > 78 3F A3 02 78 3F A3 02 CD CD CD CD 
{12052} normal block at 0x02A360B0, 108 bytes long.
 Data: <                > C0 D3 07 01 00 00 00 00 14 99 95 02 00 00 00 00 
{12051} normal block at 0x02A34498, 12 bytes long.
 Data: < D   D      > 98 44 A3 02 98 44 A3 02 CD CD CD CD 
{12050} normal block at 0x02A36008, 108 bytes long.
 Data: <                > C0 D3 07 01 00 00 00 00 B4 91 95 02 00 00 00 00 
{12049} normal block at 0x02A341F0, 12 bytes long.
 Data: < A   A      > F0 41 A3 02 F0 41 A3 02 CD CD CD CD 
{12048} normal block at 0x02A35F60, 108 bytes long.
 Data: <        |       > C0 D3 07 01 00 00 00 00 7C 8F 95 02 00 00 00 00 
Object dump complete.
El programa '[2660] ItkMFCd.exe: Nativo' terminó con código 2 (0x2).

This memory leads increasing if in my folder I have more images. I test the aplication and if I put only this instructions:

    NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();

    nameGenerator->SetInputDirectory( "C:\\patient" );

the problem continue but if I remove the second instruction the problem dissapear.

Somebody Knows why???????

Thanks
 		 	   		  
_________________________________________________________________
Los cochazos de los famosos Patrick Dempsey, Tom Cruise o Michael Douglas presumen de automóvil
http://motor.es.msn.com/coches/galeria.aspx?cp-documentid=152634169
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100628/7d58c4a3/attachment.htm>


More information about the Insight-users mailing list