[geos-devel] Copying / Non copying constructors

strk strk at keybit.net
Tue Oct 21 11:01:46 EDT 2003


Please not that Polygon constructor "suffers" from the same
problems as GeometryCollection. Constituent LinearRings will
not be copied; differently from GeometryCollection though,
vector of (holes) LinearRings is not copied as well.

You make up a LinearRing as the shell and a vector or
LinearRings as the holes, then you pass everything to 
Polygon constructor and are left with pointers to
untouchable memory.

Please consider this other element in further consistency 
related discussion.

--strk;




More information about the geos-devel mailing list