PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwcollection_free()

void lwcollection_free ( LWCOLLECTION col)

Definition at line 326 of file lwcollection.c.

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

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

327 {
328  int i;
329  if ( ! col ) return;
330 
331  if ( col->bbox )
332  {
333  lwfree(col->bbox);
334  }
335  for ( i = 0; i < col->ngeoms; i++ )
336  {
337  LWDEBUGF(4,"freeing geom[%d]", i);
338  if ( col->geoms && col->geoms[i] )
339  lwgeom_free(col->geoms[i]);
340  }
341  if ( col->geoms )
342  {
343  lwfree(col->geoms);
344  }
345  lwfree(col);
346 }
void lwfree(void *mem)
Definition: lwutil.c:214
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1050
GBOX * bbox
Definition: liblwgeom.h:489
LWGEOM ** geoms
Definition: liblwgeom.h:493
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55
Here is the call graph for this function:
Here is the caller graph for this function: