[geos-devel] [ANN] Bug #86 - Possible memory leaks caused by LineString constructor

strk at refractions.net strk at refractions.net
Wed Apr 5 05:19:10 EDT 2006


On Tue, Apr 04, 2006 at 07:27:14PM +0200, Mateusz Å?oskot wrote:
> Hi,
> 
> I've just reported new bug, quite serious because it potentially causes
> memory leaks when incomplete linesting is created.
> So, I (re)report it here because it may need some discussion.
> 
> Here is the story:
> 
> http://postgis.refractions.net/bugs/bug.php?op=show&bugid=86&pos=3

I think there are more then one such cases.
The rationale for avoiding deletion is that caller might
want to add an additional point and try construction again.
Anyway, it's probably cleaner to always take full ownership
of the passed argument and destroy it when unable to
construct. So I'd proceed with your suggested solution.

--strk;



More information about the geos-devel mailing list