PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwtin_free()

void lwtin_free ( LWTIN tin)

Definition at line 26 of file lwtin.c.

References LWTIN::bbox, LWTIN::geoms, lwfree(), lwtriangle_free(), and LWTIN::ngeoms.

Referenced by lwgeom_free().

27 {
28  int i;
29  if ( ! tin ) return;
30  if ( tin->bbox )
31  lwfree(tin->bbox);
32 
33  for ( i = 0; i < tin->ngeoms; i++ )
34  if ( tin->geoms && tin->geoms[i] )
35  lwtriangle_free(tin->geoms[i]);
36 
37  if ( tin->geoms )
38  lwfree(tin->geoms);
39 
40  lwfree(tin);
41 }
void lwfree(void *mem)
Definition: lwutil.c:214
GBOX * bbox
Definition: liblwgeom.h:567
int ngeoms
Definition: liblwgeom.h:569
LWTRIANGLE ** geoms
Definition: liblwgeom.h:571
void lwtriangle_free(LWTRIANGLE *triangle)
Definition: lwtriangle.c:56
Here is the call graph for this function:
Here is the caller graph for this function: