[libvirt] [libvirt-glib 2/2] API to save and suspend

Marc-André Lureau marcandre.lureau at gmail.com
Tue Jan 3 14:06:09 UTC 2012


Hi

On Fri, Dec 23, 2011 at 8:58 PM, Zeeshan Ali (Khattak)
<zeeshanak at gnome.org>wrote:

> +    data = g_new0(DomainSavedSuspendData, 1);
>
+    g_slice_free (DomainSavedSuspendData, data);

You are mixing g_new and g_slice, I don't think that's a problem, but
that's not consistant and worries me.

g_object_{set,get}_data could probably use the _full variant, to make sure
the data is released on object release.

Even better would be to follow glib/gio pattern, which seems to
use g_simple_async_result_set_op_res_gpointer() instead for passing
arguments, although the name function suggest result use case only.
(see gio/gfile.c). The existing code could be updated too.

-- 
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120103/e4a486a6/attachment-0001.htm>


More information about the libvir-list mailing list