PostGIS  2.3.8dev-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  int 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:242
LWPOLY ** geoms
Definition: liblwgeom.h:573
void lwpoly_free(LWPOLY *poly)
Definition: lwpoly.c:152
GBOX * bbox
Definition: liblwgeom.h:569
int ngeoms
Definition: liblwgeom.h:571
Here is the call graph for this function:
Here is the caller graph for this function: