PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

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

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: