[geos-commits] [SCM] GEOS branch master updated. d352f3c7cb208a1fbed09ec4ed54496d0d3c4a04
git at osgeo.org
git at osgeo.org
Mon Apr 15 06:20:52 PDT 2019
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".
The branch, master has been updated
via d352f3c7cb208a1fbed09ec4ed54496d0d3c4a04 (commit)
via 5f90f866dca5105cd99325378089b1ac50b95f40 (commit)
via 3c1c9a9c1153433015ace6381a7fcf6b4b3ed847 (commit)
from 859dc941be742e2b0c58dcf2395285dfc5e2e71f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d352f3c7cb208a1fbed09ec4ed54496d0d3c4a04
Merge: 5f90f86 3c1c9a9
Author: Daniel Baston <dbaston at gmail.com>
Date: Mon Apr 15 09:20:13 2019 -0400
Merge branch 'bounding-circle-leaks'
commit 5f90f866dca5105cd99325378089b1ac50b95f40
Author: Daniel Baston <dbaston at gmail.com>
Date: Sun Apr 14 22:27:46 2019 -0400
Fix memory leak in IndexedFacetDistance
diff --git a/src/operation/distance/FacetSequence.cpp b/src/operation/distance/FacetSequence.cpp
index 297de1f..1a9e0ac 100644
--- a/src/operation/distance/FacetSequence.cpp
+++ b/src/operation/distance/FacetSequence.cpp
@@ -19,6 +19,8 @@
#include <geos/algorithm/Distance.h>
#include <geos/operation/distance/FacetSequence.h>
+#include <memory>
+
using namespace geos::geom;
using namespace geos::operation::distance;
using namespace geos::algorithm;
@@ -201,7 +203,7 @@ FacetSequence::updateNearestLocationsLineLine(int i, const Coordinate& p0, const
{
LineSegment seg0(p0, p1);
LineSegment seg1(q0, q1);
- CoordinateSequence* closestPts = seg0.closestPoints(seg1);
+ std::unique_ptr<CoordinateSequence> closestPts(seg0.closestPoints(seg1));
Coordinate c0, c1;
closestPts->getAt(0, c0);
closestPts->getAt(1, c1);
commit 3c1c9a9c1153433015ace6381a7fcf6b4b3ed847
Author: Daniel Baston <dbaston at gmail.com>
Date: Sun Apr 14 22:19:11 2019 -0400
Fix memory leaks in MinimumBoundingCircle
diff --git a/src/algorithm/MinimumBoundingCircle.cpp b/src/algorithm/MinimumBoundingCircle.cpp
index 59b1084..bb3951c 100644
--- a/src/algorithm/MinimumBoundingCircle.cpp
+++ b/src/algorithm/MinimumBoundingCircle.cpp
@@ -187,9 +187,9 @@ MinimumBoundingCircle::computeCirclePoints()
* The problem is simplified by reducing to the convex hull.
* Computing the convex hull also has the useful effect of eliminating duplicate points
*/
- Geometry* convexHull = input->convexHull();
+ std::unique_ptr<Geometry> convexHull(input->convexHull());
- CoordinateSequence* cs = convexHull->getCoordinates();
+ std::unique_ptr<CoordinateSequence> cs(convexHull->getCoordinates());
std::vector<Coordinate> pts;
cs->toVector(pts);
-----------------------------------------------------------------------
Summary of changes:
src/algorithm/MinimumBoundingCircle.cpp | 4 ++--
src/operation/distance/FacetSequence.cpp | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list