PostGIS  2.5.0beta1dev-r@@SVN_REVISION@@

◆ lwpsurface_free()

void lwpsurface_free ( LWPSURFACE psurf)

Definition at line 39 of file lwpsurface.c.

References LWPSURFACE::bbox, LWPSURFACE::geoms, lwfree(), lwpoly_free(), and LWPSURFACE::ngeoms.

Referenced by lwgeom_free().

40 {
41  uint32_t i;
42  if ( ! psurf ) return;
43  if ( psurf->bbox )
44  lwfree(psurf->bbox);
45 
46  for ( i = 0; i < psurf->ngeoms; i++ )
47  if ( psurf->geoms && psurf->geoms[i] )
48  lwpoly_free(psurf->geoms[i]);
49 
50  if ( psurf->geoms )
51  lwfree(psurf->geoms);
52 
53  lwfree(psurf);
54 }
void lwfree(void *mem)
Definition: lwutil.c:244
LWPOLY ** geoms
Definition: liblwgeom.h:576
uint32_t ngeoms
Definition: liblwgeom.h:574
unsigned int uint32_t
Definition: uthash.h:78
void lwpoly_free(LWPOLY *poly)
Definition: lwpoly.c:175
GBOX * bbox
Definition: liblwgeom.h:572
Here is the call graph for this function:
Here is the caller graph for this function: