[vala] Run destructor code before member destruction in compact classes
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Run destructor code before member destruction in compact classes
- Date: Sat, 9 Jan 2010 15:36:51 +0000 (UTC)
commit 5ebc2447d8b9cb34dda5933e8b733fd7f0b0125a
Author: Yu Feng <rainwoodman gmail com>
Date: Sun Nov 1 00:47:51 2009 -0400
Run destructor code before member destruction in compact classes
Fixes bug 600285.
Signed-off-by: Yu Feng <rainwoodman gmail com>
codegen/valagtypemodule.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index ba9d115..cd0d58e 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -631,12 +631,12 @@ internal class Vala.GTypeModule : GErrorModule {
var cblock = new CCodeBlock ();
- cblock.add_statement (instance_finalize_fragment);
-
if (cl.destructor != null) {
cblock.add_statement (cl.destructor.ccodenode);
}
+ cblock.add_statement (instance_finalize_fragment);
+
var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_slice_free"));
ccall.add_argument (new CCodeIdentifier (cl.get_cname ()));
ccall.add_argument (new CCodeIdentifier ("self"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]