xref: /illumos-gate/usr/src/man/man3avl/avl_destroy.3avl (revision 30165b7f6753bc3d48c52319bed7ec7b3ea36b3c)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd May 07, 2015
15.Dt AVL_DESTROY 3AVL
16.Os
17.Sh NAME
18.Nm avl_destroy
19.Nd destroy an AVL tree
20.Sh SYNOPSIS
21.Lb libavl
22.In sys/avl.h
23.Ft void
24.Fo avl_destroy
25.Fa "avl_tree_t *tree"
26.Fc
27.Sh DESCRIPTION
28The
29.Fn avl_destroy
30function is used to destroy the AVL tree that is rooted at
31.Fa tree .
32At the time that
33.Fn avl_destroy
34is called,
35.Fa tree
36must be empty.
37It is a programmer error to call
38.Fn avl_destroy
39otherwise.
40To efficiently remove all entries in the tree, see
41.Xr avl_destroy_nodes 3AVL .
42.Pp
43After a call to
44.Fn avl_destroy ,
45.Fa tree
46should not be used with any other library functions until a subsequent
47call to
48.Xr avl_create 3AVL .
49.Sh EXAMPLES
50See the
51.Sy EXAMPLES
52section in
53.Xr libavl 3LIB .
54.Sh INTERFACE STABILITY
55.Sy Committed
56.Sh MT-Level
57See
58.Sx Locking
59in
60.Xr libavl 3LIB .
61.Sh SEE ALSO
62.Xr avl_create 3AVL ,
63.Xr avl_destroy_nodes 3AVL ,
64.Xr libavl 3LIB
65