Re: [Qemu-devel] [PATCH] qom: Make object_unref() free the object's memory when refcount goes to 0.

2012-02-26 Thread Alexander Barabash
On 02/24/2012 05:11 PM, Anthony Liguori wrote: On 02/23/2012 10:21 AM, Alexander Barabash wrote: On 02/22/2012 09:12 PM, Anthony Liguori wrote: On 02/22/2012 12:00 PM, alexander_barab...@mentor.com wrote: From: Alexander Barabashalexander_barab...@mentor.com Why do you want to have a delete

Re: [Qemu-devel] [PATCH] qom: Make object_unref() free the object's memory when refcount goes to 0.

2012-02-24 Thread Anthony Liguori
On 02/23/2012 10:21 AM, Alexander Barabash wrote: On 02/22/2012 09:12 PM, Anthony Liguori wrote: On 02/22/2012 12:00 PM, alexander_barab...@mentor.com wrote: From: Alexander Barabashalexander_barab...@mentor.com In the existing implementation, object_delete() calls object_unref(), then frees

Re: [Qemu-devel] [PATCH] qom: Make object_unref() free the object's memory when refcount goes to 0.

2012-02-23 Thread Alexander Barabash
On 02/22/2012 09:12 PM, Anthony Liguori wrote: On 02/22/2012 12:00 PM, alexander_barab...@mentor.com wrote: From: Alexander Barabashalexander_barab...@mentor.com In the existing implementation, object_delete() calls object_unref(), then frees the object's storage. Running object_delete() on an

[Qemu-devel] [PATCH] qom: Make object_unref() free the object's memory when refcount goes to 0.

2012-02-22 Thread alexander_barabash
From: Alexander Barabash alexander_barab...@mentor.com In the existing implementation, object_delete() calls object_unref(), then frees the object's storage. Running object_delete() on an object with reference count different from 1 causes program failure. In the existing implementation,

Re: [Qemu-devel] [PATCH] qom: Make object_unref() free the object's memory when refcount goes to 0.

2012-02-22 Thread Anthony Liguori
On 02/22/2012 12:00 PM, alexander_barab...@mentor.com wrote: From: Alexander Barabashalexander_barab...@mentor.com In the existing implementation, object_delete() calls object_unref(), then frees the object's storage. Running object_delete() on an object with reference count different from 1