[Gdal-dev] Reverse the effects of GDALAllRegister()?

Ben Discoe ben at vterrain.org
Tue Jun 24 23:43:04 EDT 2003


> From: Frank Warmerdam
> 
> > 	GDALAllRegister()
> > 
> > I looked for, but couldn't find, a way to tell GDAL to 
> > "unregister" and free all the drivers that it allocates
> > with GDALAllRegister().
> 
> Call GDALDestroyDriverManager().

Excellent!  Now how about OGR - is there a way to reverse the effects of
OGRRegisterAll()?  It looks like the following might do the trick:

 OGRSFDriverRegistrar *reg = OGRSFDriverRegistrar::GetRegistrar();
 delete reg;

Is that an advisable way?  A better way?

-Ben




More information about the Gdal-dev mailing list