PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwtin_free()

void lwtin_free ( LWTIN tin)

Definition at line 39 of file lwtin.c.

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

Referenced by lwgeom_free().

40 {
41  int i;
42  if ( ! tin ) return;
43  if ( tin->bbox )
44  lwfree(tin->bbox);
45 
46  for ( i = 0; i < tin->ngeoms; i++ )
47  if ( tin->geoms && tin->geoms[i] )
48  lwtriangle_free(tin->geoms[i]);
49 
50  if ( tin->geoms )
51  lwfree(tin->geoms);
52 
53  lwfree(tin);
54 }
void lwfree(void *mem)
Definition: lwutil.c:244
GBOX * bbox
Definition: liblwgeom.h:583
int ngeoms
Definition: liblwgeom.h:585
LWTRIANGLE ** geoms
Definition: liblwgeom.h:587
void lwtriangle_free(LWTRIANGLE *triangle)
Definition: lwtriangle.c:69
Here is the call graph for this function:
Here is the caller graph for this function: