[Gdal-dev] C# Dataset not calling GDALClose()?

Frank Warmerdam warmerdam at pobox.com
Wed Jul 11 13:55:03 EDT 2007


Simon Perkins wrote:
> Could you explain this DLL locking thing? It would seem to be a sad day 
> for shared libraries if only one executable could use them at a time! Or 
> is it an issue that executables don't pick up recent changes to the 
> shared library, preferring to use the OS cached version instead?

Simon,

Executable (and DLL) locking on windows seems to work such that when
an EXE or DLL is in use (loaded into the memory space of a running
process) the file in the file system is not modifiable.  So for instance,
you can't replace an in-use DLL in the file system - much less have
the change affect a running process.

But, of course, many processes can use the same DLL. It is just
write/update locked.

Win32 gurus please correct me if I'm wrong.

> I think that OGRCleanupAll() only deletes the currently registered 
> drivers, no? 

Correct.

> Does it actually unload the shared library? 

No.

 > Is there an equivalent GDAL function, BTW, GDALDeregisterAll()?

The GDALDestroyDriverManager() function does something roughly
analygous for GDAL.  I see in gdalinfo I also call CPLCleanupTLS()
after that to clean up other system (thread local storage)
resources, though I'm not sure if that is needed anymore.

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    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list