J'utilise libnotify pour afficher les notifications de bureau dans mon application; notify_notification_new()
renvoie un NotifyNotification*
, qui doit être transmis en tant que premier paramètre aux autres appels de fonction de la bibliothèque de notification.Un g_object_new doit-il correspondre à g_object_unref?
Il n'y a pas notify_notification_free()
qui libère le pointeur qu'il renvoie. Je regardais la source de notify_notification_new()
et à l'intérieur il fait un g_object_new()
, obtient un GObject * et retourne en tant que NotfiyNotification*
, alors quand ma demande fait le nettoyage, dois-je appeler un g_object_unref()
sur le pointeur retourné par notify_notification_new()
?
C'était perspicace; Merci pour l'info. – legends2k
@ptomato Quels en-têtes supplémentaires dois-je appeler 'g_object_unref()'? J'inclus actuellement seulement 'libnotify/notify.h'. –
'#include' –
ptomato