PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ rect_tree_free()

void rect_tree_free ( RECT_NODE node)

Recurse from top of node tree and free all children.

Free the rect-tree memory.

does not free underlying point array.

Definition at line 69 of file lwtree.c.

70 {
71  int i;
72  if (!node) return;
73  if (!rect_node_is_leaf(node))
74  {
75  for (i = 0; i < node->i.num_nodes; i++)
76  {
77  rect_tree_free(node->i.nodes[i]);
78  node->i.nodes[i] = NULL;
79  }
80  }
81  lwfree(node);
82 }
void lwfree(void *mem)
Definition: lwutil.c:244
void rect_tree_free(RECT_NODE *node)
Recurse from top of node tree and free all children.
Definition: lwtree.c:69
static int rect_node_is_leaf(const RECT_NODE *node)
Definition: lwtree.c:31
struct rect_node * nodes[RECT_NODE_SIZE]
Definition: lwtree.h:61
Definition: lwtree.h:75

References rect_node::i, lwfree(), RECT_NODE_INTERNAL::nodes, RECT_NODE_INTERNAL::num_nodes, and rect_node_is_leaf().

Referenced by RectTreeBuilder(), RectTreeFreer(), test_rect_tree_contains_point(), test_rect_tree_distance_tree_case(), and tree_inter().

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