[geos-devel] GEOS Todo

Norman Vine nhv at cape.com
Tue May 27 19:23:21 EDT 2003


David Blasby
> 
> Norman Vine wrote:
> > David Blasby writes:
> > 
> >>There are two outstanding issues in GEOS:
> >>
> >>1. memory management.  This is high priority.
> > 
> > 
> > Using the c++ autoptr or a homegrown equivalant
> > would help *alot* here
> 
> This is even more basic - if you delete any one Geometry you will 
> usually delete the PrecisionModel of *all* your Geometries.

This is easily worked around by having a Geomety bump the 
Precision Model Object refcnt in its constructor and decrementing 
the refcnt in its destructor

Another perhaps *faster* method is to have the Precison Model 
refcnt bumped twice by the higheest level invoking function 

This will ensure that the Precison Model refcnt will never fall to zero
hence not be deleted by any operations before the hifh level calling
routine is reasy to return at which time it decrements the extera refcnt.
 
> For catching the smaller leaks, a few people mentioned a really good 
> opensource memory-leak-fixer program.  I cannot remember the name.

On Linux Valgrind is becoming the defacto standard in some camps

Cheers

Norman



More information about the geos-devel mailing list