lambda-calculus/string/free.c
2025-01-13 20:36:07 -06:00

21 lines
252 B
C

#include <stdlib.h>
#include <debug.h>
#include "struct.h"
#include "free.h"
void free_string(
struct string* this)
{
ENTER;
if (this && !--this->refcount)
{
free(this->data);
free(this);
}
EXIT;
}