| iMatix home page | << | < | > | >> |
SFL Version 2.10 |
#include "sflstr.h" char ** strfree ( char **string)
Releases memory occupied by a string. Call this function only when you previously allocated the string using malloc or strdupl(). You pass the address of a char pointer; this function sets the pointer to NULL. This is a safety measure meant to make it safe to try to free non-allocated strings. In your code, initialise all such pointers to NULL. Returns the address of the modified pointer.
{ ASSERT (string); if (*string) { free (*string); *string = NULL; } return (string); }
| << | < | > | >> | Copyright © 1996-99 iMatix Corporation |