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

Definition at line 339 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(), 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().

340 {
341  int i;
342  if ( ! col ) return;
343 
344  if ( col->bbox )
345  {
346  lwfree(col->bbox);
347  }
348  for ( i = 0; i < col->ngeoms; i++ )
349  {
350  LWDEBUGF(4,"freeing geom[%d]", i);
351  if ( col->geoms && col->geoms[i] )
352  lwgeom_free(col->geoms[i]);
353  }
354  if ( col->geoms )
355  {
356  lwfree(col->geoms);
357  }
358  lwfree(col);
359 }
void lwfree(void *mem)
Definition: lwutil.c:242
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1063
GBOX * bbox
Definition: liblwgeom.h:504
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: