PostGIS  2.5.0dev-r@@SVN_REVISION@@
void lwcollection_free ( LWCOLLECTION col)

Definition at line 342 of file lwcollection.c.

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

Referenced by _lwt_AddLineEdge(), BOX3D_to_LWGEOM(), lwcollection_homogenize(), 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().

343 {
344  uint32_t i;
345  if ( ! col ) return;
346 
347  if ( col->bbox )
348  {
349  lwfree(col->bbox);
350  }
351  for ( i = 0; i < col->ngeoms; i++ )
352  {
353  LWDEBUGF(4,"freeing geom[%d]", i);
354  if ( col->geoms && col->geoms[i] )
355  lwgeom_free(col->geoms[i]);
356  }
357  if ( col->geoms )
358  {
359  lwfree(col->geoms);
360  }
361  lwfree(col);
362 }
void lwfree(void *mem)
Definition: lwutil.c:244
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1137
GBOX * bbox
Definition: liblwgeom.h:504
uint32_t ngeoms
Definition: liblwgeom.h:506
unsigned int uint32_t
Definition: uthash.h:78
LWGEOM ** geoms
Definition: liblwgeom.h:508
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88

Here is the call graph for this function:

Here is the caller graph for this function: