New function: g_clear_object()

By analogy to g_clear_error, takes a pass-by-reference GObject reference
and, if non-%NULL, unrefs it and sets it equal to %NULL.

Bug #620263.
This commit is contained in:
Ryan Lortie
2010-11-08 16:42:32 -05:00
parent 78bc8bec4f
commit 1a1fc130ec
7 changed files with 93 additions and 1 deletions

View File

@@ -257,6 +257,7 @@ GParameter
g_object_ref
g_object_unref
g_object_ref_sink
g_clear_object
GInitiallyUnowned
GInitiallyUnownedClass
G_TYPE_INITIALLY_UNOWNED