[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 00/12] qdev: correct reference counting
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2 00/12] qdev: correct reference counting |
Date: |
Fri, 25 Jan 2013 11:25:42 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
Il 25/01/2013 10:21, Andreas Färber ha scritto:
>> >
>> > Ping.
> I believe I was still waiting for an explanation why this qbus_init()
> function must be exposed rather than one _new() and one _initialize()
> function... Not getting feedback on that, I was already considering
> sending you an alternative patch for the initial two.
Because you cannot object_initialize the result of object_new. It would
overwrite the free callback and leak memory.
So you need three functions: _new() (which is usually called foo_create
for buses), _initialize() (which is usually foo_create_inplace), and a
third which I called _init().
Paolo
- [Qemu-devel] [PATCH v2 07/12] qdev: move unrealization of devices from finalize to unparent, (continued)
- [Qemu-devel] [PATCH v2 07/12] qdev: move unrealization of devices from finalize to unparent, Paolo Bonzini, 2013/01/21
- [Qemu-devel] [PATCH v2 11/12] cpu: do not use object_delete, Paolo Bonzini, 2013/01/21
- [Qemu-devel] [PATCH v2 09/12] qdev: inline object_delete into qbus_free/qdev_free, Paolo Bonzini, 2013/01/21
- [Qemu-devel] [PATCH v2 04/12] qom: document reference counting of link properties, Paolo Bonzini, 2013/01/21
- [Qemu-devel] [PATCH v2 08/12] qdev: add reference for the bus while it is referred to by the DeviceState, Paolo Bonzini, 2013/01/21
- [Qemu-devel] [PATCH v2 10/12] qdev: drop extra references at creation time, Paolo Bonzini, 2013/01/21
- [Qemu-devel] [PATCH v2 12/12] qom: remove object_delete, Paolo Bonzini, 2013/01/21
- Re: [Qemu-devel] [PATCH v2 00/12] qdev: correct reference counting, Anthony Liguori, 2013/01/21
- Re: [Qemu-devel] [PATCH v2 00/12] qdev: correct reference counting, Paolo Bonzini, 2013/01/25