[vala] Fix memory management in generic methods



commit cc37940b6e0b00bf7a657cdcbb266d83e51950fb
Author: Jürg Billeter <j bitron ch>
Date:   Sat Sep 19 11:17:01 2009 +0200

    Fix memory management in generic methods

 codegen/valaccodebasemodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 2b804c4..1c16854 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3279,7 +3279,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 			return null;
 		}
 
-		if (dupexpr is CCodeIdentifier && !(expression_type is ArrayType) && !is_ref_function_void (expression_type)) {
+		if (dupexpr is CCodeIdentifier && !(expression_type is ArrayType) && !(expression_type is GenericType) && !is_ref_function_void (expression_type)) {
 			// generate and call NULL-aware ref function to reduce number
 			// of temporary variables and simplify code
 



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