Changes between Version 1 and Version 4 of Ticket #5303


Ignore:
Timestamp:
Jan 22, 2015, 3:15:39 AM (9 years ago)
Author:
akhliustov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5303

    • Property Summary Cleanup completeness in GDALDestroyDriverManager and OGRCleanupAll[PATCH] Cleanup completeness in GDALDestroyDriverManager and OGRCleanupAll
  • Ticket #5303 – Description

    v1 v4  
    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).
     11. In supplied global destruction functions ''GDALDestroy'' and ''DllMain'' ''GDALDestroyDriverManager'' is called before ''OGRCleanupAll''.
     2The former calls a bunch of cleanup functions ending with ''CPLCleanupMasterMutex''.
     3Unfortunately, ''OGRCleanupAll'' immediately tries to get another mutex, recreating the master mutex.
    44
    5 2. There a is possibility that ''CPLCleanupMasterMutex'' will not be called at all, if ''GDALDriverManager'' is not instantiated (http://trac.osgeo.org/gdal/browser/trunk/gdal/gcore/gdaldrivermanager.cpp#L828).
     52. There is a possibility that ''CPLCleanupMasterMutex'' will not be called at all, if ''GDALDriverManager'' was not instantiated.
    66
    77These issues can be fixed by adding required calls to ''OGRCleanupAll''.