GRASS Programmer's Manual  6.4.2(2012)
free.c
Go to the documentation of this file.
00001 #include <grass/btree.h>
00002 #include <stdlib.h>
00003 
00004 int btree_free(BTREE * B)
00005 {
00006     void *data, *key;
00007 
00008     btree_rewind(B);
00009     while (btree_next(B, &key, &data)) {
00010         free(key);
00011         free(data);
00012     }
00013     free(B->node);
00014 
00015     return 0;
00016 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines