From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbYDh-0001HC-7L for qemu-devel@nongnu.org; Fri, 16 Dec 2011 08:53:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbYDg-0001SW-18 for qemu-devel@nongnu.org; Fri, 16 Dec 2011 08:53:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbYDf-0001SQ-Ov for qemu-devel@nongnu.org; Fri, 16 Dec 2011 08:53:03 -0500 Message-ID: <4EEB4D38.6050200@redhat.com> Date: Fri, 16 Dec 2011 14:52:56 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1323721784-704-1-git-send-email-aliguori@us.ibm.com> <4EEA3813.80006@us.ibm.com> <4EEB1277.4070803@redhat.com> <4EEB1ABB.50204@redhat.com> <4EEB1F3B.8070302@redhat.com> <4EEB3891.2020003@redhat.com> <4EEB4CD1.7050701@us.ibm.com> In-Reply-To: <4EEB4CD1.7050701@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Markus Armbruster 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