Allocator


Description:

[ CCode ( has_target = false ) ]
public delegate void* Allocator (void* data, size_t length)

An allocator used to allocate data for the attributes in this [struct@Attributes] set.

This is a function that acts like g_realloc. Specifically it frees when length is set to zero, it allocates when data is set to null, and it reallocates when both are valid.

Parameters:

data

Memory to allocate or deallocate.

length

New length of memory.

Returns:

The allocated memory, or null when freeing.


Namespace: Gck
Package: gck-2