PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ RTreeFree()

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.

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
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
struct rtree_node * leftNode
Definition: lwgeom_rtree.h:49
struct rtree_node * rightNode
Definition: lwgeom_rtree.h:50
LWLINE * segment
Definition: lwgeom_rtree.h:51
RTREE_INTERVAL * interval
Definition: lwgeom_rtree.h:48

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

Referenced by RTreeCacheClear().

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