[geos-commits] r2210 - trunk/source/operation/valid

svn_geos at osgeo.org svn_geos at osgeo.org
Thu Oct 23 13:33:16 EDT 2008


Author: warmerdam
Date: 2008-10-23 13:33:16 -0400 (Thu, 23 Oct 2008)
New Revision: 2210

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

Modified: trunk/source/operation/valid/IsValidOp.cpp
===================================================================
--- trunk/source/operation/valid/IsValidOp.cpp	2008-10-23 17:28:07 UTC (rev 2209)
+++ trunk/source/operation/valid/IsValidOp.cpp	2008-10-23 17:33:16 UTC (rev 2210)
@@ -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