[geos-devel] Interface consistency
strk
strk at keybit.net
Tue Jun 15 04:39:21 EDT 2004
Before releasing next GEOS I'd like to fix interface inconsistencies.
Namely some geometry constructors take ownership over passed
components:
o Polygon::Polygon(LinearRing *shell, vector<Geoemtry *> *holes)
will not copy shell and holes, and destroy it at
polygon destruction time.
o GeometryCollection::GeometryCollection(const vector<Geometry *>*geoms)
will copy vector, but not geoms, which it will destroy
at GeometryCollection destruction time.
o MultiGEOM::MultiGEOM(const vector<GEOM *>*geoms)
see GeoemtryCollection constructor
Other geometry constructors all copy their arguments. I think this needs
to be fixed to "all-constructors-copy-arguments". This will break existing
applications, but if we make the change now I don't think there will be
so much applications involved.
Comments ?
--strk;
More information about the geos-devel
mailing list