[geos-commits] [SCM] GEOS branch master updated. b4126e15a78d816366f9e58c8dd59f2ce6872c4d
git at osgeo.org
git at osgeo.org
Tue Sep 17 23:49:49 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 b4126e15a78d816366f9e58c8dd59f2ce6872c4d (commit)
from a375a9a9921c38cd5fa01b4feaf8d4e0acab802e (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 b4126e15a78d816366f9e58c8dd59f2ce6872c4d
Author: Sandro Santilli <strk at kbt.io>
Date: Wed Sep 18 08:48:42 2019 +0200
Allocate default geometryfactory on the stack
Makes valgrind happier.
Closes #714
Thanks Sandro Mani
diff --git a/NEWS b/NEWS
index b3532bb..fd058f0 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,7 @@ Changes in 3.8.0
- Improve robustness of Delaunay triangulations (Paul Ramsey, Martin Davis)
- Improve overlay performance (Paul Ramsey)
- Improve cascaded union performance (Paul Ramsey, Martin Davis)
+ - Allocate default GeometryFactory singleton on the stack (Sandro Mani)
Changes in 3.7.2
diff --git a/src/geom/GeometryFactory.cpp b/src/geom/GeometryFactory.cpp
index 368e6d1..7ba51e9 100644
--- a/src/geom/GeometryFactory.cpp
+++ b/src/geom/GeometryFactory.cpp
@@ -766,8 +766,8 @@ GeometryFactory::destroyGeometry(Geometry* g) const
const GeometryFactory*
GeometryFactory::getDefaultInstance()
{
- static GeometryFactory* defInstance = new GeometryFactory();
- return defInstance;
+ static GeometryFactory defInstance;
+ return &defInstance;
}
/*private*/
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
src/geom/GeometryFactory.cpp | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list