PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwmpoly_free()

void lwmpoly_free ( LWMPOLY mpoly)

Definition at line 53 of file lwmpoly.c.

References LWMPOLY::bbox, LWMPOLY::geoms, lwfree(), lwpoly_free(), and LWMPOLY::ngeoms.

Referenced by geography_centroid(), lwgeom_free(), RASTER_getPolygon(), rt_raster_geos_spatial_relationship(), and test_raster_surface().

54 {
55  int i;
56  if ( ! mpoly ) return;
57  if ( mpoly->bbox )
58  lwfree(mpoly->bbox);
59 
60  for ( i = 0; i < mpoly->ngeoms; i++ )
61  if ( mpoly->geoms && mpoly->geoms[i] )
62  lwpoly_free(mpoly->geoms[i]);
63 
64  if ( mpoly->geoms )
65  lwfree(mpoly->geoms);
66 
67  lwfree(mpoly);
68 }
void lwfree(void *mem)
Definition: lwutil.c:244
void lwpoly_free(LWPOLY *poly)
Definition: lwpoly.c:174
LWPOLY ** geoms
Definition: liblwgeom.h:496
int ngeoms
Definition: liblwgeom.h:494
GBOX * bbox
Definition: liblwgeom.h:492
Here is the call graph for this function:
Here is the caller graph for this function: