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