On Fri, 2020-04-03 at 17:03 +0100, Daniel P. Berrangé wrote: > On Fri, Apr 03, 2020 at 05:15:28PM +0200, Rafael Fonseca wrote: > > This patch series convert various simple instances of virObject to > > a > > GObject equivalent. > > > > virDomain is still WIP because it causes some linking problem I am > > still > > investigating. > > > > virObjects that work as parent class to other objects will be > > covered in > > a next patchset. > > virConnectPtr is the one I don't know how we'll solve. > > virConnectClose requires us to return 0 if the last reference > was released, 1 otherwise. g_object_unref returns void :-( > > I've tried to think about ways to detect the removal of the > last reference, but can't figure out a nice solution thus far... Wouldn't something like g_object_add_weak_pointer() work for this?