PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ lwpoly_free()

void lwpoly_free ( LWPOLY poly)

Definition at line 175 of file lwpoly.c.

References LWPOLY::bbox, lwfree(), LWPOLY::nrings, ptarray_free(), and LWPOLY::rings.

Referenced by _lwt_AddFaceSplit(), BOX2D_to_LWGEOM(), BOX3D_to_LWGEOM(), do_test_lwgeom_effectivearea_polys(), lwcurvepoly_area(), LWGEOM_envelope(), lwgeom_free(), LWGEOM_interiorringn_polygon(), lwmpoly_free(), lwpoly_filterm(), lwpsurface_free(), polygon_to_geometry(), RASTER_getPixelPolygons(), RASTER_nearestValue(), rt_raster_compute_skewed_raster(), rt_raster_gdal_rasterize(), rt_raster_surface(), ST_MakeEnvelope(), test_lwpoly_construct_circle(), test_ptarray_isccw(), and test_raster_pixel_as_polygon().

176 {
177  uint32_t t;
178 
179  if (!poly) return;
180 
181  if (poly->bbox) lwfree(poly->bbox);
182 
183  if ( poly->rings )
184  {
185  for (t = 0; t < poly->nrings; t++)
186  if (poly->rings[t]) ptarray_free(poly->rings[t]);
187  lwfree(poly->rings);
188  }
189 
190  lwfree(poly);
191 }
void lwfree(void *mem)
Definition: lwutil.c:244
void ptarray_free(POINTARRAY *pa)
Definition: ptarray.c:328
GBOX * bbox
Definition: liblwgeom.h:455
uint32_t nrings
Definition: liblwgeom.h:457
unsigned int uint32_t
Definition: uthash.h:78
POINTARRAY ** rings
Definition: liblwgeom.h:459
Here is the call graph for this function:
Here is the caller graph for this function: