PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_no_memory_leaked_when_iterator_is_partially_used()

static void test_no_memory_leaked_when_iterator_is_partially_used ( void  )
static

Definition at line 150 of file cu_iterator.c.

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 }
LWPOINTITERATOR * lwpointiterator_create(const LWGEOM *g)
Create a new LWPOINTITERATOR over supplied LWGEOM*.
Definition: lwiterator.c:244
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2005
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 lwpointiterator_destroy(LWPOINTITERATOR *s)
Free all memory associated with the iterator.
Definition: lwiterator.c:269
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904

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

Referenced by iterator_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: