> Date: Wed, 29 Apr 2009 18:09:31 +0100
> From: Mateusz Loskot <mate...@loskot.net>
> Subject: Re: [geos-devel] GEOS, Shapely, DLLs, and memory
> To: GEOS Development List <geos-devel@lists.osgeo.org>
> Message-ID: <49f889cb.9070...@loskot.net>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
>
> Ragi,
>
> AFAIU, this patch is supposed to be used against string of
> characters and byte arrays, like WKT string etc.
> These are allocated using std::malloc.
>
> Users are supposed to deallocate objects with corresponding deallocators
> like functions
>
> GEOSGeom_destroy for GEOSGeometry
> EOSCoordSeq_destroy for GEOSCoordSequence
> etc.


This shows my ignorance of the C-API :) I have been working exclusively with
the C++ ABI

>
>
> There is lack of deallocator for GEOSGeomToWKT and GEOSGeomToWKB
> and this patch, AFAIU, is supposed to cover it.
>
> Perhaps it would be better to rename GEOSFree to GEOSBufWKT_destroy
> and GEOSBufWKB_destroy, for clarity.
>

Now this name change makes sense to me. My (incorrect) assumption was that
GEOSFree was meant to destroy memory allocated from within GEOS, not that it
was meant to free memory allocated exclusively by these two functions.

Thanks for the clarification.

- Ragi
_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to