PostGIS  2.1.10dev-r@@SVN_REVISION@@
void lwmpoint_free ( LWMPOINT mpt)

Definition at line 59 of file lwmpoint.c.

References LWMPOINT::bbox, LWMPOINT::geoms, lwfree(), lwpoint_free(), and LWMPOINT::ngeoms.

Referenced by lwgeom_extract_unique_endpoints(), lwgeom_free(), lwmline_locate_along(), and test_lwline_from_lwmpoint().

60 {
61  int i;
62 
63  if ( ! mpt ) return;
64 
65  if ( mpt->bbox )
66  lwfree(mpt->bbox);
67 
68  for ( i = 0; i < mpt->ngeoms; i++ )
69  if ( mpt->geoms && mpt->geoms[i] )
70  lwpoint_free(mpt->geoms[i]);
71 
72  if ( mpt->geoms )
73  lwfree(mpt->geoms);
74 
75  lwfree(mpt);
76 }
GBOX * bbox
Definition: liblwgeom.h:422
void lwfree(void *mem)
Definition: lwutil.c:190
void lwpoint_free(LWPOINT *pt)
Definition: lwpoint.c:180
LWPOINT ** geoms
Definition: liblwgeom.h:426
int ngeoms
Definition: liblwgeom.h:424

Here is the call graph for this function:

Here is the caller graph for this function: