+2008-01-10 Jürg Billeter <j@bitron.ch>
+
+ * vala/valamemorymanager.vala: fix memory management of property
+ getters with ownership transfer, fixes bug 505713
+
2008-01-10 Jürg Billeter <j@bitron.ch>
* vapi/glib-2.0.vapi: fix binding of textdomain, fixes bug 508453
/* valamemorymanager.vala
*
- * Copyright (C) 2006-2007 Jürg Billeter, Raffaele Sandrini
+ * Copyright (C) 2006-2008 Jürg Billeter, Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
visit_possibly_leaked_expression (stmt.return_expression);
}
}
- } else {
+ } else if (current_symbol is Property) {
/* property get accessor */
- visit_possibly_leaked_expression (stmt.return_expression);
+ var prop = (Property) current_symbol;
+ if (prop.type_reference.transfers_ownership) {
+ visit_possibly_missing_copy_expression (stmt.return_expression);
+ } else {
+ visit_possibly_leaked_expression (stmt.return_expression);
+ }
+ } else {
+ assert_not_reached ();
}
}
}