|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tree |
Date: | Fri, 16 Dec 2011 14:52:56 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 |
On 12/16/2011 02:51 PM, Anthony Liguori wrote:
struct ISASerial { Device parent; UART _child uart; ISABus _link *bus; }; A child should be able to be part of the parent devices memory with its life cycle bound to the parents life cycle. This is why a child property shouldn't be nullable.
100% agreed in principle.But technically, if you do not make them pointers how do you handle children that, for some reason (broken reference counting for example) outlive the parent? Aborting could be a very good answer. :)
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |