[geos-devel] Object Destruction
Mateusz Loskot
mateusz at loskot.net
Fri Oct 30 02:10:55 PDT 2015
On 27 October 2015 at 12:48, thilo.fischer at ksti.de
<thilo.fischer at ksti.de> wrote:
> http://trac.osgeo.org/geos/ticket/325
> [...]
> Is it that a destroy function for CoordinateSequence is missing in GEOS
> (is it a bug?),
I'd say, Sandro's comment explains the reason:
"In JTS GeometryFactory? is a class while CoordinateSequenceFactory?
is an interface. In JTS neither GeometryFactory? nor
CoordinateSequenceFactory? have a destroy function."
> or did I fail to notice some detail in the GEOS API which solves this issue?
C API offers GEOSCoordSeq_destroy for this purpose.
> Is myGeosGeometry->getFactory()->destroyGeometry(myGeosGeometry) the intended
> way to delete Geometry objects?
IMO, yes, whenever you have access to "named destructor", call it.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the geos-devel
mailing list