Commit 2e0cc4e0 authored by Cédric Traizet's avatar Cédric Traizet

BUG: remove call to GDALDestroy() and OGRCleanupAll() in static destructors

parent 8b66351b
Pipeline #3647 passed with stages
in 140 minutes and 11 seconds
......@@ -57,10 +57,8 @@ private:
* Calls \c OGRRegisterAll().
*/
Drivers();
/** Destructor.
* Calls \c OGRCleanupAll().
*/
~Drivers();
/** Destructor. */
~Drivers() = default;
//@}
};
}
......
......@@ -33,8 +33,3 @@ otb::ogr::Drivers::Drivers()
{
OGRRegisterAll();
}
otb::ogr::Drivers::~Drivers()
{
//OGRCleanupAll();
}
......@@ -49,10 +49,9 @@ GDALDriverManagerWrapper::GDALDriverManagerWrapper()
GDALDriverManagerWrapper::~GDALDriverManagerWrapper()
{
// calling GDALDestroyDriverManager() (or GDALDestroy) from the destructor of a
// static C++ object is unsafe.
// GDALDestroyDriverManager();
// Since gdal 2.4 we need to explicitely call GDALDestroy
// GDALDestroyDriverManager is called inside
// GDALDestroy(); // gdaldllmain.cpp line 74
}
// Open the file for reading and returns a smart dataset pointer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment