[geos-commits] r2209 - branches/3.0/source/operation/valid

svn_geos at osgeo.org svn_geos at osgeo.org
Thu Oct 23 13:28:08 EDT 2008


Author: warmerdam
Date: 2008-10-23 13:28:07 -0400 (Thu, 23 Oct 2008)
New Revision: 2209

Modified:
   branches/3.0/source/operation/valid/IsValidOp.cpp
Log:
set isChecked flag after checking to fix memory leak (#169)

Modified: branches/3.0/source/operation/valid/IsValidOp.cpp
===================================================================
--- branches/3.0/source/operation/valid/IsValidOp.cpp	2008-10-22 19:45:03 UTC (rev 2208)
+++ branches/3.0/source/operation/valid/IsValidOp.cpp	2008-10-23 17:28:07 UTC (rev 2209)
@@ -111,6 +111,8 @@
 IsValidOp::checkValid(const Geometry *g)
 {
 	if (isChecked) return;
+
+        assert( validErr == NULL );
 	validErr=NULL;
 
 	// empty geometries are always valid!
@@ -126,6 +128,7 @@
 	else if ((gc=dynamic_cast<const GeometryCollection *>(g)))
 		checkValid(gc);
 	else throw util::UnsupportedOperationException();
+        isChecked=true;
 }
 
 /*



More information about the geos-commits mailing list