PostGIS  2.5.0dev-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 56 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().

57 {
58  POSTGIS_DEBUGF(2, "RTreeFree called for %p", root);
59 
60  if (root->leftNode)
61  RTreeFree(root->leftNode);
62  if (root->rightNode)
63  RTreeFree(root->rightNode);
64  lwfree(root->interval);
65  if (root->segment)
66  {
67  lwline_free(root->segment);
68  }
69  lwfree(root);
70 }
void lwfree(void *mem)
Definition: lwutil.c:244
void lwline_free(LWLINE *line)
Definition: lwline.c:76
struct rtree_node * leftNode
Definition: lwgeom_rtree.h:48
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:56
RTREE_INTERVAL * interval
Definition: lwgeom_rtree.h:47
LWLINE * segment
Definition: lwgeom_rtree.h:50
struct rtree_node * rightNode
Definition: lwgeom_rtree.h:49

Here is the call graph for this function:

Here is the caller graph for this function: