mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 04:24:32 +00:00
shared: add code comment to nm_clear_g_object()
This commit is contained in:
parent
02f4b0cbd5
commit
123765befc
|
@ -1038,6 +1038,14 @@ nm_g_object_unref(gpointer obj)
|
|||
*/
|
||||
#define nm_clear_g_free(pp) nm_clear_pointer(pp, g_free)
|
||||
|
||||
/* Our nm_clear_pointer() is more typesafe than g_clear_pointer() and
|
||||
* should be preferred.
|
||||
*
|
||||
* For g_clear_object() that is not the case (because g_object_unref()
|
||||
* anyway takes a void pointer). So using g_clear_object() is fine.
|
||||
*
|
||||
* Still have a nm_clear_g_object() because that returns a boolean
|
||||
* indication whether anything was cleared. */
|
||||
#define nm_clear_g_object(pp) nm_clear_pointer(pp, g_object_unref)
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue