[geos-devel] Object Destruction
strk at keybit.net
Fri Oct 30 03:55:59 PDT 2015
My comment just pointed out a de-facto situation:
JTS had no destructors.
In trunk we finally prevented GeometryFactory destruction via delete,
delegating it instead to its .destroy() method.
But I think you're asking about Geometry and CoordinateSequence ?
As mentioned 4 years ago, if you feel something is needed there,
please send a patch. The maintained API for GEOS is the C-API which
should have destruction methods for all objects.
On Fri, Oct 30, 2015 at 11:27:58AM +0100, Mateusz Loskot wrote:
> On 30 October 2015 at 10:47, thilo.fischer at ksti.de
> <thilo.fischer at ksti.de> wrote:
> > On 30 October 2015 at 10:10, <geos-devel-bounces at lists.osgeo.org on behalf
> > of mateusz at loskot.net> 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."
> > I must confess: I don't fully understand this part of Sandro's comment. In
> > JTS, we have Garbage Collection and thus no need for destruction
> > functions, isn't it?
> I understand it differently: JTS API does not provide such method(s),
> so GEOS does not have it either - GEOS is a direct port of JTS without
> any (or strictly limited) custom extension to the master API defined in JTS.
> However, it would be best if Sandro chimed in and clarify that.
> Best regards,
> Mateusz Loskot, http://mateusz.loskot.net
> geos-devel mailing list
> geos-devel at lists.osgeo.org
More information about the geos-devel