Gck.Attributes.ref_sink

### Method

# Gck Attributesref_sink

#### Declaration [src]

    GckAttributes*
    gck_attributes_ref_sink (
      GckAttributes* attrs
    )

#### Description [src]

`GckAttributes` uses a floating reference count system. `gck_builder_end()` and `gck_attributes_new_empty()` both return floating references.

Calling this function on a `GckAttributes` with a floating reference will convert the floating reference into a full reference. Calling this function on a non-floating `GckAttributes` results in an additional normal reference being added.

In other words, if the `attrs` is floating, then this call “assumes ownership” of the floating reference, converting it to a normal reference. If the `attrs` is not floating, then this call adds a new normal reference increasing the reference count by one.

All Gck library functions that assume ownership of floating references are documented as such. Essentially any Gck function that performs an operation using a `GckAttributes` argument rather than operating on the attributes themselves, will accept a floating reference.

#### Return value

Type: `GckAttributes`

The referenced attributes.

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