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

Definition at line 316 of file lwcollection.c.

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

Referenced by lwcollection_homogenize(), lwgeom_free(), LWGEOM_geometryn_collection(), lwgeom_node(), lwgeom_to_x3d3(), pta_desegmentize(), test_lwcollection_extract(), test_lwline_clip(), test_lwline_clip_big(), test_lwline_split_by_point_to(), and test_lwmline_clip().

317 {
318  int i;
319  if ( ! col ) return;
320 
321  if ( col->bbox )
322  {
323  lwfree(col->bbox);
324  }
325  for ( i = 0; i < col->ngeoms; i++ )
326  {
327  LWDEBUGF(4,"freeing geom[%d]", i);
328  if ( col->geoms && col->geoms[i] )
329  lwgeom_free(col->geoms[i]);
330  }
331  if ( col->geoms )
332  {
333  lwfree(col->geoms);
334  }
335  lwfree(col);
336 }
void lwfree(void *mem)
Definition: lwutil.c:190
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1006
GBOX * bbox
Definition: liblwgeom.h:461
LWGEOM ** geoms
Definition: liblwgeom.h:465
#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: