[geos-commits] r2654 - trunk/source/operation/buffer
svn_geos at osgeo.org
svn_geos at osgeo.org
Mon Oct 5 13:20:45 EDT 2009
Author: strk
Date: 2009-10-05 13:20:45 -0400 (Mon, 05 Oct 2009)
New Revision: 2654
Modified:
trunk/source/operation/buffer/BufferBuilder.cpp
trunk/source/operation/buffer/OffsetCurveBuilder.cpp
Log:
More memory leak fixes in single-sided buffering implementation
Modified: trunk/source/operation/buffer/BufferBuilder.cpp
===================================================================
--- trunk/source/operation/buffer/BufferBuilder.cpp 2009-10-05 16:58:38 UTC (rev 2653)
+++ trunk/source/operation/buffer/BufferBuilder.cpp 2009-10-05 17:20:45 UTC (rev 2654)
@@ -178,12 +178,15 @@
new std::vector< Geometry * >();
for ( unsigned int i = 0, n = nodedEdges->size(); i < n; ++i )
{
- Geometry* tmp = geomFact->createLineString(
- ( *nodedEdges )[i]->getCoordinates() );
+ SegmentString* ss = ( *nodedEdges )[i];
+ Geometry* tmp = geomFact->createLineString( ss->getCoordinates() );
+ delete ss;
+
singleSidedNodedEdges->push_back( tmp );
}
nodedEdges.reset();
+
Geometry* singleSided = geomFact->createMultiLineString(
singleSidedNodedEdges );
Modified: trunk/source/operation/buffer/OffsetCurveBuilder.cpp
===================================================================
--- trunk/source/operation/buffer/OffsetCurveBuilder.cpp 2009-10-05 16:58:38 UTC (rev 2653)
+++ trunk/source/operation/buffer/OffsetCurveBuilder.cpp 2009-10-05 17:20:45 UTC (rev 2654)
@@ -165,7 +165,7 @@
}
// NOTE: we take ownership of lineCoord here ...
- CoordinateSequence* lineCoord = vertexList->getCoordinates() ;
+ std::auto_ptr<CoordinateSequence> lineCoord (vertexList->getCoordinates());
// [strk] Oct 1, 2009
// Left side: index [n-1] to [endCapIndex]
More information about the geos-commits
mailing list