
13 Nov
2012
13 Nov
'12
6:17 p.m.
On Tue, Nov 13, 2012 at 6:30 PM, Christophe Fergeau <cfergeau@redhat.com> wrote:
When creating an object wrapping a libvirt object (GVirDomain, GVirStoragePool, GVirStorageVol), libvirt-gobject gets a reference to a libvirt object to be used as a handle, and then creates the wrapper object by calling g_object_new(..., "handle", handle, NULL);
However, the underlying libvirt object is registered as a boxed type with the gobject type system, and the handle setter for these object calls g_value_dup_boxed, which in turn adds a reference on the libvirt handle. Thus we must release the initial ref we hold on the libvirt handle after calling g_object_new().
Looks good. ACK. -- Regards, Zeeshan Ali (Khattak) FSF member#5124