27 lines
361 B
C
27 lines
361 B
C
|
|
#include <stdlib.h>
|
|
|
|
#include <debug.h>
|
|
|
|
#include <extern/avl/avl.h>
|
|
|
|
#include "struct.h"
|
|
#include "free.h"
|
|
|
|
void free_environment(
|
|
struct environment* this)
|
|
{
|
|
ENTER;
|
|
|
|
if (this && !--this->refcount)
|
|
{
|
|
free_environment(this->fallback);
|
|
|
|
avl_free_tree(this->tree);
|
|
|
|
free(this);
|
|
}
|
|
|
|
EXIT;
|
|
}
|
|
|