mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
docs: Explain why destroy() is implemented
As destroy() is Clutter-specific and not generic GObject code, explain why we implement it (rather than dispose()).
This commit is contained in:
parent
e69d60e8b6
commit
885664f725
@ -203,6 +203,31 @@
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
|
||||
<formalpara>
|
||||
<title>Object destruction:
|
||||
<function>cb_button_destroy()</function></title>
|
||||
|
||||
<para><type>ClutterActor</type> subclasses based
|
||||
on composition should implement the <function>destroy()</function>
|
||||
virtual function. This is called on an actor when its
|
||||
container is destroyed to clean up the resources
|
||||
allocated to the actor; it also emits a
|
||||
<emphasis>destroy</emphasis> signal which other code can
|
||||
hook onto.</para>
|
||||
</formalpara>
|
||||
|
||||
<para>In the case of <type>CbButton</type>, the
|
||||
<function>destroy()</function> implementation calls
|
||||
<function>clutter_actor_destroy()</function> on the child
|
||||
<type>ClutterBox</type>, then sets that child to
|
||||
<constant>NULL</constant>. Finally, it checks for a
|
||||
<function>destroy()</function> implementation on the parent
|
||||
class, then calls it if one exists.</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
||||
<formalpara>
|
||||
|
Loading…
Reference in New Issue
Block a user