[gdal-dev] Why is CSLUniquePtr internal?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Why is CSLUniquePtr internal?

Kurt Schwehr-2
Even,

In https://trac.osgeo.org/gdal/changeset/41104, you put CSLUniquePtr behind GDAL_COMPILATION.  Can you explain why?  I would like to use it in some of my code rather than the usual MakeCleanup with CPLDestroy that I usually do.

Thanks,
-kurt

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Why is CSLUniquePtr internal?

Even Rouault-2

On lundi 8 janvier 2018 09:08:44 CET Kurt Schwehr wrote:

> Even,

>

> In https://trac.osgeo.org/gdal/changeset/41104, you put CSLUniquePtr

> behind GDAL_COMPILATION. Can you explain why? I would like to use it in

> some of my code rather than the usual MakeCleanup with CPLDestroy that I

> usually do.

 

I didn't really feel that needed to be part of the API. I don't have a strong opinion on this though

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Why is CSLUniquePtr internal?

Kurt Schwehr-2
Since the C style string lists get exposed so often in the API, I am strongly in favor of exposing it and encouraging its use.

I am of the opinion that modern C++ code should rarely use bare malloc/free/new/delete and variants of those (doubly strong for the delete side) .

Anyone have a reason to not expose it?

On Mon, Jan 8, 2018 at 9:15 AM, Even Rouault <[hidden email]> wrote:

On lundi 8 janvier 2018 09:08:44 CET Kurt Schwehr wrote:

> Even,

>

> In https://trac.osgeo.org/gdal/changeset/41104, you put CSLUniquePtr

> behind GDAL_COMPILATION. Can you explain why? I would like to use it in

> some of my code rather than the usual MakeCleanup with CPLDestroy that I

> usually do.

 

I didn't really feel that needed to be part of the API. I don't have a strong opinion on this though

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com




--

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev