version 1.15 | | version 1.16 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.15 2001/05/09 06:58:12 mwedel Exp $"; | | * "$Id: map.c,v 1.16 2001/05/12 23:55:24 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
void free_all_maps() | | void free_all_maps() |
{ | | { |
while (first_map) delete_map(first_map); | | extern mapstruct *styles; |
| | mapstruct *next; |
| | int real_maps=0, style_maps=0; |
| | |
| | while (first_map) { |
| | /* I think some of the callers above before it gets here set this to be |
| | * saving, but we still want to free this data |
| | */ |
| | if (first_map->in_memory == MAP_SAVING) first_map->in_memory = MAP_IN_MEMORY; |
| | delete_map(first_map); |
| | real_maps++; |
| | } |
| | /* delete_map will try to free it from the linked list, |
| | * but won't find it, so we need to do it ourselves |
| | */ |
| | while (styles) { |
| | next = styles->next; |
| | delete_map(styles); |
| | styles=next; |
| | style_maps++; |
| | } |
| | LOG(llevDebug,"free_all_maps: Freed %d normal maps, %d style maps\n", real_maps, style_maps); |
} | | } |