1 | | 1. In supplied global destruction functions ''GDALDestroy'' and ''DllMain'' ''GDALDestroyDriverManager'' is called before ''OGRCleanupAll'' (http://trac.osgeo.org/gdal/browser/trunk/gdal/gcore/gdaldllmain.cpp#L80; http://trac.osgeo.org/gdal/browser/trunk/gdal/gcore/gdaldllmain.cpp#L119). |
2 | | The former calls a bunch of cleanup functions ending with ''CPLCleanupMasterMutex'' (http://trac.osgeo.org/gdal/browser/trunk/gdal/gcore/gdaldrivermanager.cpp#L286). |
3 | | Unfortunately, ''OGRCleanupAll'' immediately tries to get another mutex, recreating the master mutex (http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/generic/ogrsfdriverregistrar.cpp#L145). |
| 1 | 1. In supplied global destruction functions ''GDALDestroy'' and ''DllMain'' ''GDALDestroyDriverManager'' is called before ''OGRCleanupAll''. |
| 2 | The former calls a bunch of cleanup functions ending with ''CPLCleanupMasterMutex''. |
| 3 | Unfortunately, ''OGRCleanupAll'' immediately tries to get another mutex, recreating the master mutex. |