---
name: "critbit0_clear"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/critbit0_clear"
---

# critbit0\_clear(3)

free all memory associated with a critbit tree

## NAME

critbit0\_clear - free all memory associated with a critbit tree

## SYNTAX

**#include \<libowfat/critbit.h\>**

critbit0\_tree cb = { 0 };

void **critbit0\_clear**(critbit0\_tree\* *cb*);

## DESCRIPTION

critbit0\_clear deletes all keys in *cb* and frees all memory associated with it.

## NOTE

This function uses recursion to traverse the tree. It may require nontrivial amounts of available stack space.

## RETURN VALUE

none.

## SEE ALSO

[critbit0\_delete(3)](/critbit0_delete/3.md)
