qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1.3 3/5] qom: make object_delete usable for stat


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 1.3 3/5] qom: make object_delete usable for statically-allocated objects
Date: Fri, 23 Nov 2012 18:02:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2

Am 23.11.2012 09:47, schrieb Paolo Bonzini:
> 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.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>

The code is

Reviewed-by: Andreas Färber <address@hidden>

however I do not agree with the goal in the subject. I thought this was
to match C++ in actually deallocating the memory.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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