[geos-devel] GeometryCollection constructor

strk strk at keybit.net
Wed Oct 8 06:31:12 EDT 2003


Constructing a GeometryCollection from a vector of Geometry pointer
right now will just copy the pointer to that vector to private 
space, this mean that after having constructed the geometries forming
the collection and having put them in a vector you pass the
vector to new GeometryCollection and you are left with pointers to
memory that from now on should be manipulated only by the
GeometryCollection object.
I don't think this is correct. Latest postgis tries to delete the
vector used to contain child geoms and thus segfaults. I patched
GeometryCollection to copy the actual vector, not just the pointer,
but my question is: should memory copy go further copying each
object in the vector instead of just the vector itself ?

--strk;

PS: about the example cpp, I think its too early for that, I could not
    do it, but I would add comments to class definitions as soon as
    a get a cleaner idea about them. Who knows which is the format for
    doxygen to understand that again  ?




More information about the geos-devel mailing list