regfree Subroutine

Purpose

Frees any memory that is allocated by the regcomp subroutine that is associated with the Preg parameter.

Library

Standard C Library (libc. a)

Syntax

#include <regex.h>

void regfree ( Preg)
regex_t *Preg;

Description

The regfree subroutine frees any memory that is allocated by the regcomp subroutine that is associated with the Preg parameter. An expression that is defined by the Preg parameter is no longer treated as a compiled basic or extended regular expression after it is given to the regfree subroutine.

Parameters

Table 1. Parameters
Item Description
Preg Structure containing the compiled output of the regcomp subroutine. Memory that is associated with this structure is freed by the regfree subroutine.