diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2012-11-23 09:47:14 +0100 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-11-26 13:41:00 -0600 |
| commit | fde9bf4470d4a3b6ee1da0dee2370ab028b6314a (patch) | |
| tree | 7bf9d19324d25310090bd09b28cb3683cadc2251 /hw/sysbus.c | |
| parent | 667d22d1ae59da46b4c1fbd094ca61145f19b8c3 (diff) | |
| download | focaccia-qemu-fde9bf4470d4a3b6ee1da0dee2370ab028b6314a.tar.gz focaccia-qemu-fde9bf4470d4a3b6ee1da0dee2370ab028b6314a.zip | |
qom: make object_delete usable for statically-allocated objects
Store in the object the freeing function that will be used at deletion time. This makes it possible to use object_delete on statically-allocated (embedded) objects. Dually, it makes it possible to use object_unparent and object_unref without leaking memory, when the lifetime of object might extend until after the call to object_delete. Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/sysbus.c')
0 files changed, 0 insertions, 0 deletions