PostGIS  2.2.7dev-r@@SVN_REVISION@@
void lwpsurface_free ( LWPSURFACE psurf)

Definition at line 26 of file lwpsurface.c.

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

Referenced by lwgeom_free().

27 {
28  int i;
29  if ( ! psurf ) return;
30  if ( psurf->bbox )
31  lwfree(psurf->bbox);
32 
33  for ( i = 0; i < psurf->ngeoms; i++ )
34  if ( psurf->geoms && psurf->geoms[i] )
35  lwpoly_free(psurf->geoms[i]);
36 
37  if ( psurf->geoms )
38  lwfree(psurf->geoms);
39 
40  lwfree(psurf);
41 }
void lwfree(void *mem)
Definition: lwutil.c:214
LWPOLY ** geoms
Definition: liblwgeom.h:558
void lwpoly_free(LWPOLY *poly)
Definition: lwpoly.c:79
GBOX * bbox
Definition: liblwgeom.h:554
int ngeoms
Definition: liblwgeom.h:556

Here is the call graph for this function:

Here is the caller graph for this function: