[geos-commits] r2169 - trunk/tests/unit/geom
svn_geos at osgeo.org
svn_geos at osgeo.org
Tue Aug 19 13:02:09 EDT 2008
Author: mloskot
Date: 2008-08-19 13:02:09 -0400 (Tue, 19 Aug 2008)
New Revision: 2169
Modified:
trunk/tests/unit/geom/LineStringTest.cpp
Log:
LineStringTest: fixed memory leak.
Modified: trunk/tests/unit/geom/LineStringTest.cpp
===================================================================
--- trunk/tests/unit/geom/LineStringTest.cpp 2008-08-19 17:00:43 UTC (rev 2168)
+++ trunk/tests/unit/geom/LineStringTest.cpp 2008-08-19 17:02:09 UTC (rev 2169)
@@ -13,12 +13,13 @@
#include <geos/io/WKTReader.h>
#include <geos/util/GEOSException.h>
#include <geos/util/IllegalArgumentException.h>
-// std
-#include <cmath>
-#include <string>
// tut
#include <tut.h>
#include <utility.h>
+// std
+#include <string>
+#include <cmath>
+#include <cassert>
namespace tut
{
@@ -41,7 +42,15 @@
test_linestring_data()
: pm_(1000), factory_(&pm_, 0), reader_(&factory_),
empty_line_(factory_.createLineString(new geos::geom::CoordinateArraySequence()))
- {}
+ {
+ assert(0 != empty_line_);
+ }
+
+ ~test_linestring_data()
+ {
+ factory_.destroyGeometry(empty_line_);
+ empty_line_ = 0;
+ }
};
typedef test_group<test_linestring_data> group;
More information about the geos-commits
mailing list