From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tbwdu-0005Do-Ht for qemu-devel@nongnu.org; Fri, 23 Nov 2012 12:02:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tbwdo-0004Y3-L8 for qemu-devel@nongnu.org; Fri, 23 Nov 2012 12:02:18 -0500 Received: from cantor2.suse.de ([195.135.220.15]:53656 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tbwdo-0004Xy-FT for qemu-devel@nongnu.org; Fri, 23 Nov 2012 12:02:12 -0500 Message-ID: <50AFAC11.1050500@suse.de> Date: Fri, 23 Nov 2012 18:02:09 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1353660436-8897-1-git-send-email-pbonzini@redhat.com> <1353660436-8897-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1353660436-8897-4-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1.3 3/5] qom: make object_delete usable for statically-allocated objects List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, qemu-devel@nongnu.org, Liu Ping Fan 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-alloca= ted > (embedded) objects. Dually, it makes it possible to use object_unparen= t > and object_unref without leaking memory, when the lifetime of object > might extend until after the call to object_delete. >=20 > Signed-off-by: Paolo Bonzini The code is Reviewed-by: Andreas F=E4rber however I do not agree with the goal in the subject. I thought this was to match C++ in actually deallocating the memory. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg