Function

GLibrc_box_dup

Declaration

gpointer
g_rc_box_dup (
  gsize block_size,
  gconstpointer mem_block
)

Description

Allocates a new block of data with reference counting semantics, and copies block_size bytes of mem_block into it.

Available since:2.58

Parameters

block_size gsize
 

The number of bytes to copy, must be greater than 0

mem_block gconstpointer
 

The memory to copy.

Return value

Returns: gpointer
 

A pointer to the allocated memory.