Hi Peter,

> I'm writing a network backend for connman for PackageKit in C(Not python). 
> Everything is fine but I'm a bit confused by how to free memory returned by 
> GetProperties. With GetProperties, it filles a hash table with all properties 
> of an object like manager or service even the caller is only interested in 
> State, for example. So how to free those memory quickly without writing so 
> much g_free code?? Is this possible?

what D-Bus bindings are you using? Low-level or GLib D-Bus? I assume it
is the GLib one since you have a hash table. So as far as I recall, you
don't have to free the hash table at all in the callback of the D-Bus
function if you are using async calls. However I might be wrong here and
you should double check with valgrind.

Regards

Marcel


_______________________________________________
connman mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/connman

Reply via email to