### Function

# GLib ByteArray ref

since: 2.22

#### Declaration

    GByteArray*
    g_byte_array_ref (
      GByteArray* array
    )

#### Description

Atomically increments the reference count of `array` by one. This function is thread-safe and may be called from any thread.

Available since: 2.22

#### Parameters

`array`

  Type: An array of `guint8`

  A `GByteArray`.

  The data is owned by the caller of the function.

#### Return value

Type: An array of `guint8`

The passed in `GByteArray`.

The caller of the function takes ownership of the data, and is responsible for freeing it.