Update the floating docs wrt to GInitiallyUnowned.

2006-03-30  Matthias Clasen  <mclasen@redhat.com>

	* gobject/tmpl/objects.sgml: Update the floating docs wrt
	to GInitiallyUnowned.
This commit is contained in:
Matthias Clasen 2006-03-30 20:38:09 +00:00 committed by Matthias Clasen
parent 8763438c33
commit 9b6f47f9b4
2 changed files with 11 additions and 6 deletions

View File

@ -1,5 +1,8 @@
2006-03-30 Matthias Clasen <mclasen@redhat.com>
* gobject/tmpl/objects.sgml: Update the floating docs wrt
to GInitiallyUnowned.
* gobject/tmpl/param_value_types.sgml:
* gobject/tmpl/objects.sgml:
* gobject/tmpl/gtype.sgml: Additions

View File

@ -13,11 +13,12 @@ property access methods, and signal support.
Signals are described in detail in <xref linkend="gobject-Signals"/>.
</para>
<para id="floating-ref">
The initial reference a #GObject is created with is flagged as a
<firstterm>floating</firstterm> reference.
#GInitiallyUnowned is derived from #GObject. The only difference between
the two is that the initial reference of a #GInitiallyUnowned is flagged
as a <firstterm>floating</firstterm> reference.
This means that it is not specifically claimed to be "owned" by
any code portion. The main motivation for providing floating references is
C convenience. In particular, it allowes code to be written as:
C convenience. In particular, it allows code to be written as:
<example><programlisting>
container = create_container();
container_add_child (container, create_child());
@ -39,7 +40,7 @@ an ordinary reference by calling g_object_ref_sink().
For already sunken objects (objects that don't have a floating reference
anymore), g_object_ref_sink() is equivalent to g_object_ref() and returns
a new reference.
Since floating references are useful allmost exclusively for C convenience,
Since floating references are useful almost exclusively for C convenience,
language bindings that provide automated reference and memory ownership
maintenance (such as smart pointers or garbage collection) therefore don't
need to expose floating references in their API.
@ -145,6 +146,7 @@ my_singleton_constructor (GType type,
needed.
@notify: the class closure for the notify signal
<!-- ##### STRUCT GObjectConstructParam ##### -->
<para>
The <structname>GObjectConstructParam</structname> struct is an auxiliary
@ -484,8 +486,8 @@ reference.
This function is intended for #GObject implementations to re-enforce a
<link linkend="floating-ref">floating</link> object reference.
Doing this is seldomly required, all
#GObject<!-- -->s are created with a floating reference which usually
just needs to be sunken by calling g_object_ref_sink().
#GInitiallyUnowned<!-- -->s are created with a floating reference which
usually just needs to be sunken by calling g_object_ref_sink().
</para>
@object: a #GObject