I use libnotify to display desktop notifications in the application; notify_notification_new()returns NotifyNotification*which should be passed as the first parameter for further calls to the notification library functions.
notify_notification_new()
NotifyNotification*
No notify_notification_free(), which frees the returned pointer. I searched for the source notify_notification_new()and internally it executes g_object_new(), gets GObject * and returns it as NotfiyNotification*, so when my application does the cleanup, should I call a g_object_unref()in the pointer returned notify_notification_new()?
notify_notification_free()
g_object_new()
NotfiyNotification*
g_object_unref()
, . GInitiallyUnowned ; - GTK.
GInitiallyUnowned
GTK gtk_whatever_new(), , . , . g_object_ref() 2, "" . , "" .
gtk_whatever_new()
g_object_ref()
, , g_object_unref() , , . , .
, GObject s, , . , .
GObject
: , Gnome , , - .