Function

GLib-2.0GLibrc_box_alloc0Since 2.58

  • Allocates block_size bytes of memory, and adds reference counting semantics to it.

    The contents of the returned data is set to zero.

    The data will be freed when its reference count drops to zero.

    The allocated data is guaranteed to be suitably aligned for any built-in type.

    Parameters

    • block_size: number

      the size of the allocation, must be greater than 0

    Returns any

    a pointer to the allocated memory

    2.58