GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
free.c
Go to the documentation of this file.
1 #include <grass/btree.h>
2 #include <stdlib.h>
3 
4 int btree_free(BTREE * B)
5 {
6  void *data, *key;
7 
8  btree_rewind(B);
9  while (btree_next(B, &key, &data)) {
10  free(key);
11  free(data);
12  }
13  free(B->node);
14 
15  return 0;
16 }