PostGIS  2.2.7dev-r@@SVN_REVISION@@
static void RTreeFree ( RTREE_NODE root)
static

Recursively frees the child nodes, the interval and the line before freeing the root node.

Definition at line 42 of file lwgeom_rtree.c.

References rtree_node::interval, rtree_node::leftNode, lwfree(), lwline_free(), rtree_node::rightNode, and rtree_node::segment.

Referenced by RTreeCacheClear().

43 {
44  POSTGIS_DEBUGF(2, "RTreeFree called for %p", root);
45 
46  if (root->leftNode)
47  RTreeFree(root->leftNode);
48  if (root->rightNode)
49  RTreeFree(root->rightNode);
50  lwfree(root->interval);
51  if (root->segment)
52  {
53  lwline_free(root->segment);
54  }
55  lwfree(root);
56 }
void lwfree(void *mem)
Definition: lwutil.c:214
void lwline_free(LWLINE *line)
Definition: lwline.c:63
struct rtree_node * leftNode
Definition: lwgeom_rtree.h:24
static void RTreeFree(RTREE_NODE *root)
Recursively frees the child nodes, the interval and the line before freeing the root node...
Definition: lwgeom_rtree.c:42
RTREE_INTERVAL * interval
Definition: lwgeom_rtree.h:23
LWLINE * segment
Definition: lwgeom_rtree.h:26
struct rtree_node * rightNode
Definition: lwgeom_rtree.h:25

Here is the call graph for this function:

Here is the caller graph for this function: