diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2015-03-17 17:43:07 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2015-03-17 17:43:07 +0100 |
commit | 5ef6ed6fbc96bd583350599f123438e7d6834ef7 (patch) | |
tree | 5bb611ad44ab26b183a6f5ec80b121fede46d131 /gir/gobject-2.0.c | |
parent | 567dcd60215119806e316d00a6a4c8869155fb8e (diff) | |
download | gobject-introspection-5ef6ed6fbc96bd583350599f123438e7d6834ef7.tar.gz |
Update glib annotations from git master
Diffstat (limited to 'gir/gobject-2.0.c')
-rw-r--r-- | gir/gobject-2.0.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gir/gobject-2.0.c b/gir/gobject-2.0.c index efe8981a..440d0c2d 100644 --- a/gir/gobject-2.0.c +++ b/gir/gobject-2.0.c @@ -3310,6 +3310,11 @@ * * Decreases the reference count of @object. When its reference count * drops to 0, the object is finalized (i.e. its memory is freed). + * + * If the pointer to the #GObject may be reused in future (for example, if it is + * an instance variable of another object), it is recommended to clear the + * pointer to %NULL rather than retain a dangling pointer to a potentially + * invalid #GObject instance. Use g_clear_object() for this. */ @@ -3368,7 +3373,10 @@ * @flags: flags for the property specified * * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN - * property. + * property. In many cases, it may be more appropriate to use an enum with + * g_param_spec_enum(), both to improve code clarity by using explicitly named + * values, and to allow for more values to be added in future without breaking + * API. * * See g_param_spec_internal() for details on property names. * @@ -3716,6 +3724,8 @@ * @flags: flags for the property specified * * Creates a new #GParamSpecPointer instance specifying a pointer property. + * Where possible, it is better to use g_param_spec_object() or + * g_param_spec_boxed() to expose memory management information. * * See g_param_spec_internal() for details on property names. * |