« Previous | Next » 

Revision 02a5c4c9

ID02a5c4c97422b40034f31265e0f139f7846172a8

Added by Stefan Hajnoczi almost 11 years ago

qdev: Drop misleading qdev_free() function

The qdev_free() function name is misleading since all the function does
is unlink the device from its parent. The device is not necessarily
freed.

The device will be freed when its QObject refcount reaches zero. It is
usual for the parent (bus) to hold the final reference but there are
cases where something else holds a reference so "free" is a misleading
name.

Call object_unparent(obj) directly instead of having a qdev wrapper
function.

Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Eric Blake <>
Signed-off-by: Andreas Färber <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences