On Fri, 17 Feb 2017 13:32:15 +
Peter Maydell wrote:
> On 16 February 2017 at 15:11, Igor Mammedov wrote:
> > On Thu, 16 Feb 2017 14:18:05 +
> > Peter Maydell wrote:
> >> I've always found the object reference semantics somewhat
> >> confusing (why does realizing a device add a referen
On 16 February 2017 at 15:11, Igor Mammedov wrote:
> On Thu, 16 Feb 2017 14:18:05 +
> Peter Maydell wrote:
>> I've always found the object reference semantics somewhat
>> confusing (why does realizing a device add a reference,
>> for instance?). Do we document them anywhere?
> I'm not aware o
On Thu, 16 Feb 2017 14:18:05 +
Peter Maydell wrote:
> On 16 February 2017 at 13:57, Igor Mammedov wrote:
> > object_new(FOO) returns an object with ref_cnt == 1
> > and following
> > object_property_set_bool(cpuobj, true, "realized", NULL)
> > set parent of cpuobj to '/machine/unattached'
On 16 February 2017 at 13:57, Igor Mammedov wrote:
> object_new(FOO) returns an object with ref_cnt == 1
> and following
> object_property_set_bool(cpuobj, true, "realized", NULL)
> set parent of cpuobj to '/machine/unattached' which makes
> ref_cnt == 2.
>
> Since machvirt_init() doesn't take o
object_new(FOO) returns an object with ref_cnt == 1
and following
object_property_set_bool(cpuobj, true, "realized", NULL)
set parent of cpuobj to '/machine/unattached' which makes
ref_cnt == 2.
Since machvirt_init() doesn't take ownership of cpuobj
returned by object_new() it should explicitly