<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Date: Wed, 29 Apr 2009 18:09:31 +0100<br>
From: Mateusz Loskot &lt;<a href="mailto:mateusz@loskot.net">mateusz@loskot.net</a>&gt;<br>
Subject: Re: [geos-devel] GEOS, Shapely, DLLs, and memory<br>
To: GEOS Development List &lt;<a href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:49F889CB.9070803@loskot.net">49F889CB.9070803@loskot.net</a>&gt;<br>
Content-Type: text/plain; charset=UTF-8; format=flowed<br>
<br>
<br>
Ragi,<br>
<br>
AFAIU, this patch is supposed to be used against string of<br>
characters and byte arrays, like WKT string etc.<br>
These are allocated using std::malloc.<br>
<br>
Users are supposed to deallocate objects with corresponding deallocators<br>
like functions<br>
<br>
GEOSGeom_destroy for GEOSGeometry<br>
EOSCoordSeq_destroy for GEOSCoordSequence<br>
etc.</blockquote><div><br>This shows my ignorance of the C-API :) I have been working exclusively with the C++ ABI<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
There is lack of deallocator for GEOSGeomToWKT and GEOSGeomToWKB<br>
and this patch, AFAIU, is supposed to cover it.<br>
<br>
Perhaps it would be better to rename GEOSFree to GEOSBufWKT_destroy<br>
and GEOSBufWKB_destroy, for clarity.<br>
</blockquote><div><br>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.<br>
<br>Thanks for the clarification.<br><br>- Ragi<br><br> </div></div><br>