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

Reply via email to