DBUS service using glib: question
Havoc Pennington
hp at redhat.com
Sat Jul 15 07:14:29 PDT 2006
Xavier Claessens wrote:
>
> Thank you very much, it works :D
>
> My last question, if I return a string (char*) with
>
> char *str = g_strdup(...);
> ...
> dbus_g_method_return(context, str);
>
> will str be freed ? Or should I add g_free(str); after ?
>
Without looking at the glib bindings, I *hope* you need to g_free(); the
glib/gtk convention is that functions never "adopt" memory ownership.
Havoc
More information about the dbus
mailing list