[vtkusers] File Handle Leak in VTK Reader for Tecplot

Ahmad falahatpisheh at gmail.com
Tue Feb 7 02:31:12 EST 2012


Hi All,

I am trying to read 1000 files by vtkTecplotReader. The pseudo code, applied
in C++,  is as follows:

for(i=0; i<1000; i++){
    // create the reader
    vtkSmartPointer<vtkTecplotReader> reader =
vtkSmartPointer<vtkTecplotReader>::New();		
    
    // set the file name
    reader->SetFileName(filename_in_dir[i].c_str());
    reader->Update();
}

When the number of open file exceed the maximum _setmaxstdio(), it crashes.
In my case it happens when I opened about 500 files. It seems there is a
file handle leak and the opened file is not closed. Does anybody have any
idea how to solve this problem?

Thanks,
Ahmad

--
View this message in context: http://vtk.1045678.n5.nabble.com/File-Handle-Leak-in-VTK-Reader-for-Tecplot-tp5462422p5462422.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list