cairo/doc/reference/xml/cairo_reference.xml

35 lines
1.4 KiB
XML

<refentry id="cairo_reference">
<refmeta>
<refentrytitle>cairo_reference</refentrytitle>
<manvolnum>3</manvolnum>
</refmeta>
<refnamediv>
<refname>cairo_reference</refname>
<refpurpose>increase reference count of <link linkend="cairo_t">cairo_t</link></refpurpose>
</refnamediv>
<refsynopsisdiv>
<programlisting>
void cairo_reference (<link linkend="cairo_t">cairo_t</link> *cr)</programlisting>
<variablelist role="params">
<varlistentry>
<term><parameter>cr</parameter> :</term>
<listitem>
<simpara>a <link linkend="cairo_t">cairo_t</link></simpara>
</listitem>
</varlistentry>
</variablelist>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
<indexterm>
<primary>functions</primary>
<secondary>cairo_reference</secondary>
</indexterm>
<indexterm>
<primary/>
</indexterm>
When calling <function>cairo_reference</function> the reference count will be increased by one and the caller becomes owner of the <link linkend="cairo_t">cairo_t</link>. When the creator of the <link linkend="cairo_t">cairo_t</link> destroys the the object via <link linkend="cairo_destroy">cairo_destroy</link> the refcount will be decreased but the object will stay valid, since you are still owner of the object.
</para>
</refsect1>
</refentry>