[geos-devel] using CoordinateOperation::edit cause memory leaks

Sandro Santilli strk at keybit.net
Wed May 22 09:36:50 PDT 2013


On Wed, May 22, 2013 at 09:58:20AM +0200, Tereza Fiedlerová wrote:
> Hi,
> 
> I'm sorry for my long reaction time, but I have still the same problem
> and I hope you still can help me. I tried to create a minimal example.
> This example returns both my problems - memory leak because of using
> WKT and also the problem with GeometryEditorOperation as I wrote
> before.
> The input is simple wkt polygon and I just trying to change its
> position. The main.cpp file is attached to this email.

Tereza, the GeometryEditor::edit method is documented [1] to return
a _new_ Geometry, so it's up to you to delete the one you passed to it,
just do that and all leaks are gone.

[1] http://trac.osgeo.org/geos/browser/tags/3.3.8/include/geos/geom/util/GeometryEditor.h#L118

--strk;


More information about the geos-devel mailing list