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. It is a programmer error to call 37.Fn avl_destroy 38otherwise. To efficiently remove all entries in the tree, see 39.Xr avl_destroy_nodes 3AVL . 40.Pp 41After a call to 42.Fn avl_destroy , 43.Fa tree 44should not be used with any other library functions until a subsequent 45call to 46.Xr avl_create 3AVL . 47.Sh EXAMPLES 48See the 49.Sy EXAMPLES 50section in 51.Xr libavl 3LIB . 52.Sh INTERFACE STABILITY 53.Sy Committed 54.Sh MT-Level 55See 56.Sx Locking 57in 58.Xr libavl 3LIB . 59.Sh SEE ALSO 60.Xr avl_create 3AVL , 61.Xr avl_destroy_nodes 3AVL , 62.Xr libavl 3LIB 63