[Gdal-dev] Registering a format driver at run-time

Peng Gao pgao at esri.com
Mon Feb 13 19:33:42 EST 2006


> Could you try commenting out the following two lines?
> 
>              if( --poUnderlyingIOStream->nFileViewCount == 0 )
>                  delete poUnderlyingIOStream;
> 

I tried and it didn't make any difference. 

One solution for the wrong heap context is to
destroy the dataset in the dll where it comes from.
Instead of deleting a dataset in GDALClose or directly in an app, each
driver
will provide matching Close() function that deletes/releases the dataset
returned from Open()/Create().

I think AutoLoadDrivers() will have similar problem.


> This is in ~ECWDataset in gdal/frmts/ecw/ecwdataset.cpp.
> 
> By the way, there is another approach to plugins for drivers.
> It is described (very briefly) at:
> 
> http://www.gdal.org/classGDALDriverManager.html#1e10f0276813a9
> 996f7f7c57486e787b
> 
> Best regards,
> -- 
> ---------------------------------------+----------------------
> ----------
> ---------------------------------------+------
> I set the clouds in motion - turn up   | Frank Warmerdam, 
> warmerdam at pobox.com
> 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