On Thu, 2008-09-25 at 09:05 -0700, Martin Davis wrote: > 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?
Right. I inferred from Mateusz's comments that there were problems with circular references which couldn't be sorted out in a straightforward manner by fixing the constructors/deconstuctors. That's why I was suggesting that if this is the case then a different design should be considered. But if each object has a well defined set of internal objects which can be freed upon destruction, then that is a different matter - in this case either someone will need to fix them by hand - or preferably implement hierarchical memory management. Martin, would there ever be a case where a hidden internal object could be shared between multiple parent objects? ATB, Mark. _______________________________________________ geos-devel mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/geos-devel
