[Gdal-dev] OGRLayer::GetGeometryColumn & GetFIDColumn

Mateusz Loskot mateusz at loskot.net
Tue Jun 13 07:45:45 EDT 2006


Craig Miller wrote:
> Hi,
> 
> I've been browsing the docs, but they are silent on this particular 
> question.  Could anyone clarify who owns the char* returned

It's not a type of char* but const char*.

> from OGRLayer::GetGeometryColumn and OGRLayer::GetFIDColumn?  E.g. 
> should I delete them when I am through with them or does the OGRLayer
>  still own them?

Client are not supposed to deallocate memory pointed by const char*
returned from those functions above. They are deallocated in OGRLayer
destructor, more precisely, in destructors of layer classes derived from
OGRLayer in particular driver.

Also, you're reading those values in read-only mode.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list