Mateusz,

IMO you're on the right track with the idea that MCIndexSegmentSetMutualIntersector owns the segChains that it allocates. They can be deleted in it's destructor. I don't see the design problem. What's wrong with having complex long-lived structures which allocate internal objects, and then free them when the structure is itself destroyed?

Mateusz Loskot wrote:
Folks,

I've started memory leaks cleanup [1] in GEOS and found quite serious
design issue around MonotoneChain components.

Here is longer story [2] with suggested solution, however I'm not enough
knowledgeable about all internals especially about possible relations
between various collections allocated internally as well as flows and
ownership transfers.

I'd be thankful if original authors of these components (Ben?, Sandro?)
could share their minds.

[1] http://trac.osgeo.org/geos/ticket/207
[2] http://trac.osgeo.org/geos/ticket/207#comment:4

Best regards,

--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
geos-devel mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to