On Thu, Apr 30, 2015 at 11:47:09PM +0200, Paolo Bonzini wrote:
> 
> 
> On 30/04/2015 22:21, Andreas Färber wrote:
> >>+    cpu->self = cobj;
> >>+    object_property_add_link(cpu_container, path, TYPE_CPU, &cpu->self, 
> >>NULL,
> >>+                             OBJ_PROP_LINK_UNREF_ON_RELEASE, &error_abort);
> 
> Doesn't this leak the CPU object?

I am not sure I follow. CPUs can't be destroyed today because there's no
code to remove them from the global cpus list.  The day we implement
cpu_exec_uninit(), it should undo everything done by cpu_exec_init()
including removing the link above and removing the CPU from the global
cpus list.

> 
> I have a patch to add "." and ".." properties.  You can use them to add
> an alias to an object.

What's the difference between a link and an alias to an object?

-- 
Eduardo

Reply via email to