From 6fd839627240945fc949f7ce9fd58b644bcaed9f Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Wed, 16 Mar 2011 13:02:05 +0100 Subject: [PATCH] codegen: Drop MemberAccess creation for disposing of 'this' in block data --- codegen/valaccodebasemodule.vala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index aab8d65b..9d9c3f9e 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -1854,9 +1854,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { } else { if (in_constructor || (current_method != null && current_method.binding == MemberBinding.INSTANCE) || (current_property_accessor != null && current_property_accessor.prop.binding == MemberBinding.INSTANCE)) { - var ma = new MemberAccess.simple ("this"); - ma.symbol_reference = current_class; - ccode.add_expression (get_unref_expression (new CCodeMemberAccess.pointer (new CCodeIdentifier ("_data%d_".printf (block_id)), "self"), new ObjectType (current_class), ma)); + var this_value = new GLibValue (new ObjectType (current_class), new CCodeMemberAccess.pointer (new CCodeIdentifier ("_data%d_".printf (block_id)), "self")); + ccode.add_expression (destroy_value (this_value)); } } -- 2.11.4.GIT