PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwmline_free()

void lwmline_free ( LWMLINE mline)

Definition at line 112 of file lwmline.c.

113 {
114  if (!mline)
115  return;
116 
117  if (mline->bbox)
118  lwfree(mline->bbox);
119 
120  if (mline->geoms)
121  {
122  for (uint32_t i = 0; i < mline->ngeoms; i++)
123  if (mline->geoms[i])
124  lwline_free(mline->geoms[i]);
125  lwfree(mline->geoms);
126  }
127 
128  lwfree(mline);
129 }
void lwfree(void *mem)
Definition: lwutil.c:242
void lwline_free(LWLINE *line)
Definition: lwline.c:67
GBOX * bbox
Definition: liblwgeom.h:532
LWLINE ** geoms
Definition: liblwgeom.h:533
uint32_t ngeoms
Definition: liblwgeom.h:538

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

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

Here is the call graph for this function:
Here is the caller graph for this function: