[gdal-dev] GetSpatialRef, OGRSpatialReference and memory leaks ?
Andrew C Aitchison
andrew at aitchison.me.uk
Mon Aug 3 03:16:14 PDT 2020
On Mon, 3 Aug 2020, Even Rouault wrote:
> Andrew,
>
> You should hold a OGRSpatialReference object as a member variable of the dataset object
> and return its address. The ownership of the object remains to the dataset object as
> indicated in the doc:
Thanks. I figured that from Andrew Bell's hint.
> /**
> * \brief Fetch the spatial reference for this dataset.
> *
> * Same as the C function GDALGetSpatialRef().
> *
> * When a projection definition is not available, null is returned
> *
> * @since GDAL 3.0
> *
> * @return a pointer to an internal object. It should not be altered or freed.
> * Its lifetime will be the one of the dataset object, or until the next
> * call to this method.
> *
> * @see http://www.gdal.org/osr_tutorial.html
> */
That page redirects (301 Moved Permanently) to
https://gdal.org/osr_tutorial.html
which gives
404 Not Found
--
Andrew C. Aitchison Kendal, UK
andrew at aitchison.me.uk
More information about the gdal-dev
mailing list