qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 04/13] qom: delete properties before calling


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [RFC PATCH 04/13] qom: delete properties before calling instance_finalize
Date: Wed, 11 Jun 2014 23:42:54 +1000

On Wed, Jun 11, 2014 at 10:19 PM, Paolo Bonzini <address@hidden> wrote:
> This ensures that the children's unparent callback will still
> have a usable parent.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  qom/object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index 69a95d6..780aaa8 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -407,8 +407,8 @@ static void object_finalize(void *data)
>      Object *obj = data;
>      TypeImpl *ti = obj->class->type;
>
> -    object_deinit(obj, ti);
>      object_property_del_all(obj);
> +    object_deinit(obj, ti);

Does this means you lose access to your own properties before calling
your own finalisation? I guess its a non-issue if all clients just use
private fields directly, but it seems weird you cant use your own
getter at the end because it's dissappeared on you already.

Regards,
Peter

>
>      g_assert(obj->ref == 0);
>      if (obj->free) {
> --
> 1.8.3.1
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]