[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/11] qom: remove object_delete
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 11/11] qom: remove object_delete |
Date: |
Wed, 5 Dec 2012 21:44:42 +0100 |
This is now unused.
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/qemu/object.h | 17 ++---------------
qom/object.c | 7 -------
2 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/include/qemu/object.h b/include/qemu/object.h
index ed1f47f..c5169ee 100644
--- a/include/qemu/object.h
+++ b/include/qemu/object.h
@@ -455,9 +455,7 @@ struct InterfaceClass
* object_new:
* @typename: The name of the type of the object to instantiate.
*
- * This function will initialize a new object using heap allocated memory.
This
- * function should be paired with object_delete() to free the resources
- * associated with the object.
+ * This function will initialize a new object using heap allocated memory.
*
* Returns: The newly allocated and instantiated object.
*/
@@ -467,24 +465,13 @@ Object *object_new(const char *typename);
* object_new_with_type:
* @type: The type of the object to instantiate.
*
- * This function will initialize a new object using heap allocated memory.
This
- * function should be paired with object_delete() to free the resources
- * associated with the object.
+ * This function will initialize a new object using heap allocated memory.
*
* Returns: The newly allocated and instantiated object.
*/
Object *object_new_with_type(Type type);
/**
- * object_delete:
- * @obj: The object to free.
- *
- * Finalize an object and then free the memory associated with it. This should
- * be paired with object_new() to free the resources associated with an object.
- */
-void object_delete(Object *obj);
-
-/**
* object_initialize_with_type:
* @obj: A pointer to the memory to be used for the object.
* @type: The type of the object to instantiate.
diff --git a/qom/object.c b/qom/object.c
index ecdf164..e9212fd 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -416,13 +416,6 @@ Object *object_new(const char *typename)
return object_new_with_type(ti);
}
-void object_delete(Object *obj)
-{
- object_unparent(obj);
- g_assert(obj->ref == 1);
- object_unref(obj);
-}
-
Object *object_dynamic_cast(Object *obj, const char *typename)
{
if (obj && object_class_dynamic_cast(object_get_class(obj), typename)) {
--
1.8.0.1
- Re: [Qemu-devel] [PATCH 01/11] qdev: export and use qbus_init, (continued)
- [Qemu-devel] [PATCH 02/11] qdev: use object_new, not g_malloc to create buses, Paolo Bonzini, 2012/12/05
- [Qemu-devel] [PATCH 03/11] qom: preserve object while unparenting it, Paolo Bonzini, 2012/12/05
- [Qemu-devel] [PATCH 04/11] qdev: add reference count to a device for the BusChild, Paolo Bonzini, 2012/12/05
- [Qemu-devel] [PATCH 05/11] qdev: move deletion of children from finalize to unparent, Paolo Bonzini, 2012/12/05
- [Qemu-devel] [PATCH 06/11] qdev: move unrealization of devices from finalize to unparent, Paolo Bonzini, 2012/12/05
- [Qemu-devel] [PATCH 07/11] qdev: add reference for the bus while it is referred to by the DeviceState, Paolo Bonzini, 2012/12/05
- [Qemu-devel] [PATCH 08/11] qdev: inline object_delete into qbus_free/qdev_free, Paolo Bonzini, 2012/12/05
- [Qemu-devel] [PATCH 09/11] qdev: drop extra references at creation time, Paolo Bonzini, 2012/12/05
- [Qemu-devel] [PATCH 11/11] qom: remove object_delete,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 10/11] cpu: do not use object_delete, Paolo Bonzini, 2012/12/05
- Re: [Qemu-devel] [PATCH 00/11] qdev: correct reference counting, Paolo Bonzini, 2012/12/17