Gck.Allocator

function onAllocator(data: void, length: Number(gsize)): void {
}
  

An allocator used to allocate data for the attributes in this GckAttributes 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.

data

Memory to allocate or deallocate.

length

New length of memory.

Returns

The allocated memory, or NULL when freeing.