Share this page

# Example: free

The following example uses free to de-allocate a buffer of length 1024.

        char * buf;
        if ((buf = (char *)calloc(1024, sizeof(char))) == NULL) {
            lr_output_message ("Insufficient memory available");
            return -1;
        }
        lr_output_message ("Memory allocated. Buffer address = %.8x", buf);

        // Do something with the buffer here ...

        // Now free the buffer

        free(buf);

    Example: Output:
    Action.c(11): Memory allocated. Buffer address = 007b9d88

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: