[geos-devel] GEOS, Shapely, DLLs, and memory

Ragi Y. Burhum ragi at burhum.com
Tue Apr 28 13:31:56 EDT 2009


>
>
> Date: Mon, 27 Apr 2009 13:46:09 -0600
> From: Charlie Savage <cfis at savagexi.com>
> Subject: Re: [geos-devel] GEOS, Shapely, DLLs, and memory
> To: GEOS Development List <geos-devel at lists.osgeo.org>
> Message-ID: <49F60B81.8070304 at savagexi.com>
> Content-Type: text/plain; charset="utf-8"
>
>
>
> Paul Ramsey wrote:
> > On Mon, Apr 27, 2009 at 11:47 AM, Aron Bierbaum <aronbierbaum at gmail.com>
> wrote:
> >
> >> I have attached a patch for both GEOS and Shapely that we have been
> >> testing with for a few weeks without any problems. Does anyone have a
> >> better way to address this issue?
> >
> > Pretty simple patch... more C-API changes. Hmm. Perhaps GEOS 3.2 will
> > be out sooner than one might expect.
> >
> > I don't have the smarts to know if there's a better way.
>
> There isn't.  For every piece of memory GEOS allocates and returns via
> the capi (or C++ api), it must provide a function to free it.
>
> If you are using C++ you can get around it by providing a memory
> deallocator for objects returned from GEOS (say for std::string in this
> case) but for C you obviously can't do that.


Well, there is another way (not necessarily "better"), which is to compile
the GEOS dll yourself using the same runtime that you use in your main
application. That is what I have been doing this whole time to avoid this
issue.

- Ragi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20090428/badf67f8/attachment.html


More information about the geos-devel mailing list