[geos-commits] r2811 - in trunk/source: geom/prep
headers/geos/geom/prep
svn_geos at osgeo.org
svn_geos at osgeo.org
Tue Dec 8 12:42:03 EST 2009
Author: strk
Date: 2009-12-08 12:42:02 -0500 (Tue, 08 Dec 2009)
New Revision: 2811
Modified:
trunk/source/geom/prep/PreparedLineString.cpp
trunk/source/headers/geos/geom/prep/PreparedLineString.h
Log:
Add missing destructor of PreparedLineString (closes ticket #305)
Modified: trunk/source/geom/prep/PreparedLineString.cpp
===================================================================
--- trunk/source/geom/prep/PreparedLineString.cpp 2009-12-08 17:39:59 UTC (rev 2810)
+++ trunk/source/geom/prep/PreparedLineString.cpp 2009-12-08 17:42:02 UTC (rev 2811)
@@ -31,6 +31,17 @@
* public:
*/
+PreparedLineString::~PreparedLineString()
+{
+ delete segIntFinder;
+ for ( noding::SegmentString::ConstVect::size_type i = 0,
+ ni = segStrings.size(); i < ni; ++i )
+ {
+ delete segStrings[ i ]->getCoordinates();
+ delete segStrings[ i ];
+ }
+}
+
noding::FastSegmentSetIntersectionFinder *
PreparedLineString::getIntersectionFinder()
{
Modified: trunk/source/headers/geos/geom/prep/PreparedLineString.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedLineString.h 2009-12-08 17:39:59 UTC (rev 2810)
+++ trunk/source/headers/geos/geom/prep/PreparedLineString.h 2009-12-08 17:42:02 UTC (rev 2811)
@@ -55,6 +55,8 @@
segIntFinder( NULL)
{ }
+ ~PreparedLineString();
+
noding::FastSegmentSetIntersectionFinder * getIntersectionFinder();
bool intersects(const geom::Geometry * g) const;
More information about the geos-commits
mailing list