PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwcollection_free()

void lwcollection_free ( LWCOLLECTION col)

Definition at line 356 of file lwcollection.c.

357 {
358  uint32_t i;
359  if ( ! col ) return;
360 
361  if ( col->bbox )
362  {
363  lwfree(col->bbox);
364  }
365  for ( i = 0; i < col->ngeoms; i++ )
366  {
367  LWDEBUGF(4,"freeing geom[%d]", i);
368  if ( col->geoms && col->geoms[i] )
369  lwgeom_free(col->geoms[i]);
370  }
371  if ( col->geoms )
372  {
373  lwfree(col->geoms);
374  }
375  lwfree(col);
376 }
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
void lwfree(void *mem)
Definition: lwutil.c:244
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
uint32_t ngeoms
Definition: liblwgeom.h:510
GBOX * bbox
Definition: liblwgeom.h:508
LWGEOM ** geoms
Definition: liblwgeom.h:512
unsigned int uint32_t
Definition: uthash.h:78

References LWCOLLECTION::bbox, LWCOLLECTION::geoms, LWDEBUGF, lwfree(), lwgeom_free(), and LWCOLLECTION::ngeoms.

Referenced by _lwt_AddLineEdge(), BOX3D_to_LWGEOM(), lwcollection_from_wkb_state(), lwcollection_homogenize(), lwcollection_offsetcurve(), lwgeom_free(), LWGEOM_geometryn_collection(), lwgeom_node(), lwgeom_split_wrapx(), lwgeom_subdivide(), lwgeom_to_x3d3_sb(), lwt_ModEdgeSplit(), lwt_NewEdgesSplit(), pta_unstroke(), test_geos_subdivide(), test_lwcollection_extract(), test_lwline_clip(), test_lwline_clip_big(), test_lwline_split_by_point_to(), test_lwmline_clip(), and TWKBFromLWGEOMArray().

Here is the call graph for this function:
Here is the caller graph for this function: