NAME

cat_freememdb - destroy an in-memory database and its contents.

SYNOPSIS

#include <cat/cat.h>

#include <cat/catutil.h>

int cat_freememdb(cat_memdb *db);

DESCRIPTION

This function destroys the database pointed to by db and frees any allocated memory. The memdb should have been created with a previous call to cat_newmemdb.

After this call, db should not be used again and its contents will be lost.

RETURN VALUES

The function returns 0 if successful, and a negative code on error.

SEE ALSO

cat, catutil

cat_newmemdb, cat_memdbfunc, cat_memdbforeach, cat_memdbflags