Skip to content

FREE

FREE

Description

Safely deallocates memory and nullifies pointer.

Parameters

Name Direction Description
x in,out Pointer 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)

Usage examples (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);
    }
Last updated on