FREE

Table of Contents

FREE

Description

Safely deallocates memory and nullifies pointer.

Parameters

NameDirectionDescription
xin,outPointer variable to free.

Success

Memory is deallocated and pointer set to NULL.

Failure

Function cannot fail - safe to call with NULL.

Usage example (Cross-references)

    
    if (*zs)
    FREE(*zs);
    }
    (void)IntToBytesBE(value, buffer, byte_len);
    write_char_internal(o, fmt_info->flags, (const char *)buffer, byte_len);
    FREE(buffer);
    return;
    }
    ValidateStr(copy);
    if (copy->data) {
    FREE(copy->data);
    }
    *copy = StrInit();
    ValidateBitVec(bitvec);
    if (bitvec->data) {
    FREE(bitvec->data);
    bitvec->data = NULL;
    }
    if (bv->length == 0) {
    // Free all memory if empty
    FREE(bv->data);
    bv->data      = NULL;
    bv->capacity  = 0;
    
    if (!prev_row || !curr_row) {
    FREE(prev_row);
    FREE(curr_row);
    LOG_FATAL("Memory allocation failed");
    if (!prev_row || !curr_row) {
    FREE(prev_row);
    FREE(curr_row);
    LOG_FATAL("Memory allocation failed");
    }
    
    u64 result = prev_row[len2];
    FREE(prev_row);
    FREE(curr_row);
    u64 result = prev_row[len2];
    FREE(prev_row);
    FREE(curr_row);
    
    return result;
    CloseHandle(proc->pi.hProcess);
    #endif
    FREE(proc);
    }
    #endif
    memset(m, 0, sizeof(SysMutex));
    FREE(m);
    }

Share :

Related Posts

LVAL

LVAL Description Creates a temporary, addressable l-value from a given expression x.

Read More

NEW

NEW Description Allocates zero-initialized memory for a type.

Read More

ALIGN_DOWN

ALIGN_DOWN Description Aligns the given value down to the nearest multiple of alignment.

Read More