[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Re: DBUS service using glib: question
From:       Havoc Pennington <hp () redhat ! com>
Date:       2006-07-15 14:14:29
Message-ID: 44B8F845.1040307 () redhat ! com
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic