Remove GtkObject from the docs
This commit is contained in:
@ -369,7 +369,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
|||||||
<xi:include href="xml/gtkcontainer.xml" />
|
<xi:include href="xml/gtkcontainer.xml" />
|
||||||
<xi:include href="xml/gtkmenushell.xml" />
|
<xi:include href="xml/gtkmenushell.xml" />
|
||||||
<xi:include href="xml/gtkmisc.xml" />
|
<xi:include href="xml/gtkmisc.xml" />
|
||||||
<xi:include href="xml/gtkobject.xml" />
|
|
||||||
<xi:include href="xml/gtkrange.xml" />
|
<xi:include href="xml/gtkrange.xml" />
|
||||||
<xi:include href="xml/gtkwidget.xml" />
|
<xi:include href="xml/gtkwidget.xml" />
|
||||||
<xi:include href="xml/gtkimcontext.xml" />
|
<xi:include href="xml/gtkimcontext.xml" />
|
||||||
|
@ -2239,28 +2239,6 @@ GtkNotebookTab
|
|||||||
GtkNotebookPrivate
|
GtkNotebookPrivate
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
|
||||||
<FILE>gtkobject</FILE>
|
|
||||||
<TITLE>GtkObject</TITLE>
|
|
||||||
GtkObject
|
|
||||||
GtkObjectFlags
|
|
||||||
GTK_OBJECT_FLAGS
|
|
||||||
gtk_object_destroy
|
|
||||||
<SUBSECTION Standard>
|
|
||||||
GTK_OBJECT
|
|
||||||
GTK_IS_OBJECT
|
|
||||||
GTK_TYPE_OBJECT
|
|
||||||
GTK_OBJECT_CLASS
|
|
||||||
GTK_IS_OBJECT_CLASS
|
|
||||||
GTK_OBJECT_GET_CLASS
|
|
||||||
|
|
||||||
<SUBSECTION Private>
|
|
||||||
gtk_object_get_type
|
|
||||||
GTK_ARG_READWRITE
|
|
||||||
GTK_OBJECT_SET_FLAGS
|
|
||||||
GTK_OBJECT_UNSET_FLAGS
|
|
||||||
</SECTION>
|
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>gtkoffscreenwindow</FILE>
|
<FILE>gtkoffscreenwindow</FILE>
|
||||||
<TITLE>GtkOffscreenWindow</TITLE>
|
<TITLE>GtkOffscreenWindow</TITLE>
|
||||||
|
@ -95,10 +95,10 @@ from functions?
|
|||||||
<answer>
|
<answer>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
See the documentation for #GObject and #GtkObject. For #GObject note
|
See the documentation for #GObject and #GInitiallyUnowned. For #GObject note
|
||||||
specifically g_object_ref() and g_object_unref(). #GtkObject is a subclass
|
specifically g_object_ref() and g_object_unref(). #GInitiallyUnowned is a
|
||||||
of #GObject so the same points apply, except that it has a "floating" state
|
subclass of #GObject so the same points apply, except that it has a "floating"
|
||||||
(explained in its documentation).
|
state (explained in its documentation).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -115,7 +115,7 @@ url="http://bugzilla.gnome.org">http://bugzilla.gnome.org</ulink>.)
|
|||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
Why does my program leak memory, if I destroy a widget immediately
|
Why does my program leak memory, if I destroy a widget immediately
|
||||||
after creating it ?
|
after creating it ?
|
||||||
</para>
|
</para>
|
||||||
</question>
|
</question>
|
||||||
@ -127,27 +127,26 @@ If <structname>GtkFoo</structname> isn't a toplevel window, then
|
|||||||
foo = gtk_foo_new (<!-- -->);
|
foo = gtk_foo_new (<!-- -->);
|
||||||
gtk_widget_destroy (foo);
|
gtk_widget_destroy (foo);
|
||||||
</programlisting></informalexample>
|
</programlisting></informalexample>
|
||||||
is a memory leak, because no one assumed the initial floating
|
is a memory leak, because no one assumed the initial floating
|
||||||
reference. If you are using a widget and you aren't immediately
|
reference. If you are using a widget and you aren't immediately
|
||||||
packing it into a container, then you probably want standard
|
packing it into a container, then you probably want standard
|
||||||
reference counting, not floating reference counting.
|
reference counting, not floating reference counting.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To to get this, you must acquire a reference to the widget and drop the
|
To to get this, you must acquire a reference to the widget and drop the
|
||||||
floating reference (<quote>ref and sink</quote> in GTK+ parlance) after
|
floating reference (<quote>ref and sink</quote> in GTK+ parlance) after
|
||||||
creating it:
|
creating it:
|
||||||
<informalexample><programlisting>
|
<informalexample><programlisting>
|
||||||
foo = gtk_foo_new (<!-- -->);
|
foo = gtk_foo_new (<!-- -->);
|
||||||
g_object_ref (foo);
|
g_object_ref_sink (foo);
|
||||||
gtk_object_sink (GTK_OBJECT (foo));
|
|
||||||
</programlisting></informalexample>
|
</programlisting></informalexample>
|
||||||
When you want to get rid of the widget, you must call gtk_widget_destroy()
|
When you want to get rid of the widget, you must call gtk_widget_destroy()
|
||||||
to break any external connections to the widget before dropping your
|
to break any external connections to the widget before dropping your
|
||||||
reference:
|
reference:
|
||||||
<informalexample><programlisting>
|
<informalexample><programlisting>
|
||||||
gtk_widget_destroy (foo);
|
gtk_widget_destroy (foo);
|
||||||
g_object_unref (foo);
|
g_object_unref (foo);
|
||||||
</programlisting></informalexample>
|
</programlisting></informalexample>
|
||||||
When you immediately add a widget to a container, it takes care of
|
When you immediately add a widget to a container, it takes care of
|
||||||
assuming the initial floating reference and you don't have to worry
|
assuming the initial floating reference and you don't have to worry
|
||||||
|
Reference in New Issue
Block a user