qom: document reference counting of link properties
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Jan 2013 13:12:31 +0000 (14:12 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 1 Feb 2013 21:53:10 +0000 (15:53 -0600)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
include/qom/object.h

index 48e80ba229ce984d6f4065cc271b424323bb4e42..bfd848ffe32f0286883ec58a103023b668c3aa78 100644 (file)
@@ -1041,6 +1041,11 @@ void object_property_add_child(Object *obj, const char *name,
  * between objects.
  *
  * Links form the graph in the object model.
+ *
+ * Ownership of the pointer that @child points to is transferred to the
+ * link property.  The reference count for <code>*@child</code> is
+ * managed by the property from after the function returns till the
+ * property is deleted with object_property_del().
  */
 void object_property_add_link(Object *obj, const char *name,
                               const char *type, Object **child,