[gdal-dev] copying a GDALColorTable

Even Rouault even.rouault at mines-paris.org
Sun Nov 11 10:22:19 PST 2012


Le dimanche 11 novembre 2012 19:16:30, David Strip a écrit :
> If I'm reading the docs right, there is no copy constructor or
> assignment operator for a GDALColorTable.
> If I use GDALColorTable::clone(), how do release the copy when I'm done?
> Do I use CPLFree or can I use delete?

delete should work, but the preferred way would be GDALDestroyColorTable() to 
avoid potential cross-heap issues on Windows in case your code and GDAL aren't 
built with the same compiler / compiler options.

> Thanks.
> 
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list