FREEEXPR(3)

NAME
freeExpr - frees an expression.

SYNOPSYS
#include "logmmm.h"
void freeExpr(expr)
chain_list *expr;

PARAMETER

expr
    Expression to free.

DESCRIPTION
freeExpr() frees an expression (operator expression or atomic expression) by giving back to MBK allocator system all the chain_list doublets used in expr. It's very important to call freeExpr as often as possible to minimize memory use. Many functions like copyExpr() or flatPolarityExpr() create new ABLs , so great care should be taken concerning memory allocation problems. For each example given in this documentation, the freeExpr() function is called as often as possible.

EXAMPLE
#include "mutnnn.h"		/* mbk utilities */
#include "logmmm.h"
chain_list *expr;
expr = createExpr(OR);
addHExpr(expr,createAtom("var1"));
addHExpr(expr,createAtom("var2"));
freeExpr(expr);

SEE ALSO
log(1), abl(1), createAtom(3), createExpr(3), notExpr(3), createBinExpr(3), addQExpr(3), addHExpr(3).