[gdal-dev] files remaining open after OGR reads SDTS vectors

Frank Warmerdam warmerdam at p...
Mon Apr 15 09:16:37 EDT 2002


bdiscoe wrote:
> I think this is because OGR is forgetting to close the files. As far 
> i can tell i am doing everything correctly:
> 
> OGRDataSource *datasource = OGRSFDriverRegistrar::Open(fname);
> // (read the data from the layers)
> delete datasource;
> 
> Is there something else i need to do so that the files get closed 
> properly? Or is this a bug?

Ben,

How embarrasing. I have corrected the OGRSDTSTDataSource destructor to
delete the underlying SDTSTransfer object which should correct the problem.
The corrected file (committed to CVS) is ogr/ogrsf_frmts/sdts/ogrsdtsdatasource.cpp.

Thanks for the pointer,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent






More information about the Gdal-dev mailing list