On Wed, May 28, 2014 at 2:24 AM, Paolo Bonzini wrote:
> Il 27/05/2014 11:02, Peter Crosthwaite ha scritto:
>
>>
>> +void memory_region_destroy(MemoryRegion *mr)
>> +{
>> +/*FIXME: whatever the opposite of object initialize is, do it here */
>> +memory_region_finalize(OBJECT(mr));
>> +}
>>
Il 27/05/2014 11:02, Peter Crosthwaite ha scritto:
+void memory_region_destroy(MemoryRegion *mr)
+{
+/*FIXME: whatever the opposite of object initialize is, do it here */
+memory_region_finalize(OBJECT(mr));
+}
+
That's object_unref.
Paolo
QOMify memory regions as an Object. The former init() and destroy()
routines become instance_init() and instance_finalize() resp.
memory_region_init() is re-implemented to be:
object_initialize() + set fields
memory_region_destroy() is re-implemented to call finalize().
Signed-off-by: Peter Cros