PostGIS  2.3.7dev-r@@SVN_REVISION@@
static void test_no_memory_leaked_when_iterator_is_partially_used ( void  )
static

Definition at line 150 of file cu_iterator.c.

References LW_PARSER_CHECK_NONE, lwgeom_free(), lwgeom_from_wkt(), lwpointiterator_create(), lwpointiterator_destroy(), and lwpointiterator_next().

Referenced by iterator_suite_setup().

151 {
152  LWGEOM* g = lwgeom_from_wkt("GEOMETRYCOLLECTION (POINT (3 7), GEOMETRYCOLLECTION(LINESTRING (2 8, 4 3), POLYGON EMPTY, MULTIPOINT ((2 8), (17 3), EMPTY)))", LW_PARSER_CHECK_NONE);
153 
155  lwpointiterator_next(it, NULL);
156  lwpointiterator_next(it, NULL);
157 
159  lwgeom_free(g);
160 }
int lwpointiterator_next(LWPOINTITERATOR *s, POINT4D *p)
Attempts to assign the next point in the iterator to p, and advances the iterator to the next point...
Definition: lwiterator.c:212
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1063
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904
LWPOINTITERATOR * lwpointiterator_create(const LWGEOM *g)
Create a new LWPOINTITERATOR over supplied LWGEOM*.
Definition: lwiterator.c:244
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:1985
void lwpointiterator_destroy(LWPOINTITERATOR *s)
Free all memory associated with the iterator.
Definition: lwiterator.c:269

Here is the call graph for this function:

Here is the caller graph for this function: