While working on a testcase for prepared geometries in GEOS I've found that the documentation for the "GEOSPrepare" function doesn't match with actual behaviour:
/* * Argument ownership is taken by prepared geometry */ extern const GEOSPreparedGeometry GEOS_DLL *GEOSPrepare(const GEOSGeometry* g); Testcase is along these lines: GEOSGeometry* g = GEOSGeomFromWKT("POLYGON EMPTY"); const GEOSPreparedGeometry* pg = GEOSPrepare(g); GEOSPreparedGeom_destroy(pg); // 'g' leaks w/out the call below //GEOSGeom_destroy(g); So, is it documentation wrong or implementation ? --strk; Free GIS & Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! _______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel