[geos-commits] r3632 - trunk/src/geom

svn_geos at osgeo.org svn_geos at osgeo.org
Wed May 16 08:20:54 EDT 2012


Author: strk
Date: 2012-05-16 05:20:53 -0700 (Wed, 16 May 2012)
New Revision: 3632

Modified:
   trunk/src/geom/GeometryFactory.cpp
Log:
Lazily create default GeometryFactory instance (#540)

Seems to fix a problem with mismatch of allocator and deallocator
for the static object

Modified: trunk/src/geom/GeometryFactory.cpp
===================================================================
--- trunk/src/geom/GeometryFactory.cpp	2012-05-16 12:20:42 UTC (rev 3631)
+++ trunk/src/geom/GeometryFactory.cpp	2012-05-16 12:20:53 UTC (rev 3632)
@@ -725,8 +725,8 @@
 const GeometryFactory*
 GeometryFactory::getDefaultInstance() 
 {
-	static GeometryFactory defInstance;
-	return &defInstance;
+	static GeometryFactory* defInstance = new GeometryFactory();
+	return defInstance;
 }
 
 } // namespace geos::geom



More information about the geos-commits mailing list