PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ lwmline_free()

void lwmline_free ( LWMLINE mline)

Definition at line 112 of file lwmline.c.

References LWMLINE::bbox, LWMLINE::geoms, lwfree(), lwline_free(), and LWMLINE::ngeoms.

Referenced by geography_centroid(), lwgeom_free(), test_geohash(), and test_lwmline_clip().

113 {
114  uint32_t i;
115  if ( ! mline ) return;
116 
117  if ( mline->bbox )
118  lwfree(mline->bbox);
119 
120  for ( i = 0; i < mline->ngeoms; i++ )
121  if ( mline->geoms && mline->geoms[i] )
122  lwline_free(mline->geoms[i]);
123 
124  if ( mline->geoms )
125  lwfree(mline->geoms);
126 
127  lwfree(mline);
128 }
void lwfree(void *mem)
Definition: lwutil.c:244
void lwline_free(LWLINE *line)
Definition: lwline.c:76
unsigned int uint32_t
Definition: uthash.h:78
uint32_t ngeoms
Definition: liblwgeom.h:483
LWLINE ** geoms
Definition: liblwgeom.h:485
GBOX * bbox
Definition: liblwgeom.h:481
Here is the call graph for this function:
Here is the caller graph for this function: