[gdal-dev] Access SVN revision number from runtime?
Even Rouault
even.rouault at mines-paris.org
Thu Aug 16 04:11:59 PDT 2012
> The rgdal source is part C (for proj), part C++ for OGR/GDAL, but C++
> written by C-minded people, so no new classes, but using C++ OGR/GDAL
> classes, things like: pDataset->~GDALDataset();.
Ah ok, so rgdal uses the GDAL C++ API (when feasable, the use of the C API is
encouraged to avoid ABI issues).
By the way pDataset->~GDALDataset() is a weird syntax. I've never used that in
any C++ code, so I am wondering if this completely destroys the object. I
suspect that the code of the destructor is called, but potentially not its super
destructor, so there must be a small memory leak. Why not using delete pDataset,
or better, to avoid cross-heap issues on Windows,
GDALClose((GDALDatasetH)pDataset) ?
> As I understand you,
> 1.x.a and 1.x.b share the C++ ABI, but say 1.x.b and 1.y.a will probably
> not.
Yes, 1.x.a and 1.x.b share the same C++ ABI, but other combinations might not.
>
> This suggests that I may use GDALCheckVersion(GDAL_VERSION_MAJOR,
> GDAL_VERSION_MINOR, NULL); to get something that might help users debug
> performance failures, but that GDAL_VERSION_REV is too fine-grained.
Yes.
More information about the gdal-dev
mailing list