[geos-devel] Re: [GEOS] #320: factory for std::vector

GEOS geos-trac at osgeo.org
Thu Apr 8 04:47:11 EDT 2010

#320: factory for std::vector
 Reporter:  12345678    |        Owner:  geos-devel at lists.osgeo.org
     Type:  task        |       Status:  new                       
 Priority:  major       |    Milestone:                            
Component:  Default     |      Version:  3.2.0                     
 Severity:  Unassigned  |   Resolution:                            
 Keywords:              |  
Comment (by mloskot):

 I confirm this is potentially an issue in cases where a factory functions
 take ownership of passed collection. For example:

 class GEOS_DLL GeometryFactory {
 MultiLineString* createMultiLineString(std::vector<Geometry *> *newLines)

 If client will allocate the ''newLines'' in EXE/DLL module and pass it to
 GEOS DLL module which later will deallocate it, then memory is
 allocated/deallocated across module boundaries] what may lead to problems.

 A factory for those containers would be useful indeed.

Ticket URL: <http://trac.osgeo.org/geos/ticket/320#comment:2>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

More information about the geos-devel mailing list