[geos-commits] r2367 - in trunk:
source/headers/geos/operation/distance tests/unit/operation/distance
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed Apr 15 05:29:52 EDT 2009
Author: strk
Date: 2009-04-15 05:29:52 -0400 (Wed, 15 Apr 2009)
New Revision: 2367
Modified:
trunk/source/headers/geos/operation/distance/DistanceOp.h
trunk/tests/unit/operation/distance/DistanceOpTest.cpp
Log:
Document ownership of DistanceOp::closestPoints return, fix leak in unit test.
Modified: trunk/source/headers/geos/operation/distance/DistanceOp.h
===================================================================
--- trunk/source/headers/geos/operation/distance/DistanceOp.h 2009-04-15 09:25:28 UTC (rev 2366)
+++ trunk/source/headers/geos/operation/distance/DistanceOp.h 2009-04-15 09:29:52 UTC (rev 2367)
@@ -73,7 +73,7 @@
*
* @param g0 a {@link Geometry}
* @param g1 another {@link Geometry}
- * @return the closest points in the geometries
+ * @return the closest points in the geometries, ownership to caller
*/
static geom::CoordinateSequence* closestPoints(geom::Geometry *g0, geom::Geometry *g1);
Modified: trunk/tests/unit/operation/distance/DistanceOpTest.cpp
===================================================================
--- trunk/tests/unit/operation/distance/DistanceOpTest.cpp 2009-04-15 09:25:28 UTC (rev 2366)
+++ trunk/tests/unit/operation/distance/DistanceOpTest.cpp 2009-04-15 09:29:52 UTC (rev 2367)
@@ -62,8 +62,9 @@
// TODO: test closestPoints() and
// closestLocations()
- geos::geom::CoordinateSequence* coords = dist.closestPoints();
- ensure(0 != coords);
+ geos::geom::CoordinateSequence* coords = dist.closestPoints();
+ ensure(0 != coords);
+ delete coords;
}
template<>
More information about the geos-commits
mailing list