[geos-commits] [SCM] GEOS branch master updated. 1f40f167dc3e63cec29c022787a75bdda94b452e

git at osgeo.org git at osgeo.org
Sun Nov 24 18:22:21 PST 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  1f40f167dc3e63cec29c022787a75bdda94b452e (commit)
      from  3e0033915f4145e4b933f60aaf2850d3ab33ae45 (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 1f40f167dc3e63cec29c022787a75bdda94b452e
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sun Nov 24 21:22:09 2019 -0500

    Fix memory leak in PointTest

diff --git a/tests/unit/geom/PointTest.cpp b/tests/unit/geom/PointTest.cpp
index 67f085c..5aeb1e4 100644
--- a/tests/unit/geom/PointTest.cpp
+++ b/tests/unit/geom/PointTest.cpp
@@ -570,14 +570,13 @@ void object::test<45>
 
     geos::geom::FixedSizeCoordinateSequence<0> seq2(2);
     ensure_equals(seq2.getDimension(), 2u);
-    ensure_equals(factory_->createPoint(seq2)->getCoordinateDimension(), 2);
+    std::unique_ptr<geos::geom::Point> pt2(factory_->createPoint(seq2));
+    ensure_equals(pt2->getCoordinateDimension(), 2);
 
     geos::geom::FixedSizeCoordinateSequence<0> seq3(3);
     ensure_equals(seq3.getDimension(), 3u);
-    ensure_equals(factory_->createPoint(seq3)->getCoordinateDimension(), 3);
-
-
-
+    std::unique_ptr<geos::geom::Point> pt3(factory_->createPoint(seq3));
+    ensure_equals(pt3->getCoordinateDimension(), 3);
 }
 
 } // namespace tut

-----------------------------------------------------------------------

Summary of changes:
 tests/unit/geom/PointTest.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list