[geos-devel] memory leaks in Bigtest

strk at refractions.net strk at refractions.net
Wed Feb 22 11:12:29 EST 2006


Stefan, the bigtest code is not really run, leaks are checked
using the XMLTest against the .xml files located under its dir.
That's the most stable testing framework in GEOS.

It would be worth porting JTS unit tests to GEOS to augment
the cases. If you want to provide a fix for the bigtest I'll
be happy to apply it.

--strk;

BTW: dynamically created objects are a plague of GEOS. I'm fighting
     against them daily.

On Wed, Feb 22, 2006 at 04:55:03PM +0100, Stefan Zschocke wrote:
> I just downloaded and compiled the Geos code. I tried the bigtest sample
> and found it leaks memory like hell.
> I hate having leaking test programs as it prevents from checking wether
> the leak is in the test or the library itself.
> First things I did: in the main, make GeometryFactory a local stack
> variable, and in run-function delete the 2 polygons after use.
> But it still leaks. I assume the leaks result from the code in
> GeometryTestFactory.cpp.
> Does someone have a clean GeometryTestFactory.cpp, which doesn't leak?
> 
> Otherwise I would have to check the code in this file to produce a
> non-leaking version.
> I already had a look at it, and saw many dynamically-created objects go
> into ctors as parameters.
> Checked a few and the ctors looked like they needed these objects
> permanently, because there were other ctor-overloads with
> const-reference parameters, which cloned the const-parms.
> But somewhere there must be a fat leak.
> 
> Thx, Stefan
> 
> BTW: I did the test with VS.Net under XP. I slightly modified the code
> to build a GEOS.DLL. Just put a dllExport-macro in the class
> declarations, but this would not affect the memory
> allocation/deallocation.
> 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel

-- 
---------------------------------------------------------------------------
State-collected Geographic Data is public property   
Sign the petition: http://petition.publicgeodata.org        
                                                      




More information about the geos-devel mailing list