+2009-01-09 Jürg Billeter <j@bitron.ch>
+
+ * vala/valasemanticanalyzer.vala:
+
+ Fix memory leak when retrieving values from property getters
+ returning owned values, fixes bug 564081
+
2009-01-09 Jürg Billeter <j@bitron.ch>
* gobject/valaccodememberaccessmodule.vala:
/* valasemanticanalyzer.vala
*
- * Copyright (C) 2006-2009 Jürg Billeter, Raffaele Sandrini
+ * Copyright (C) 2006-2009 Jürg Billeter
+ * Copyright (C) 2006-2008 Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
var prop = (Property) sym;
if (prop.property_type != null) {
var type = prop.property_type.copy ();
- type.value_owned = false;
+ if (lvalue) {
+ // setters never take ownership
+ type.value_owned = false;
+ }
return type;
}
} else if (sym is FormalParameter) {