Commit 36d47bc4 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

unref the item in foreach as Gee.Iterator.get () transfers ownership

2007-07-26  Juerg Billeter  <j@bitron.ch>

	* gobject/valacodegenerator.vala: unref the item in foreach as
	  Gee.Iterator.get () transfers ownership

svn path=/trunk/; revision=393
parent dbac5ee5
2007-07-26 Jürg Billeter <j@bitron.ch>
* gobject/valacodegenerator.vala: unref the item in foreach as
Gee.Iterator.get () transfers ownership
2007-07-26 Jürg Billeter <j@bitron.ch>
* gobject/valacodegeneratorclass.vala, vapi/glib-2.0.vala: support
......
......@@ -1471,6 +1471,8 @@ public class Vala.CodeGenerator : CodeVisitor {
cbody.add_statement (cdecl);
cbody.add_statement (stmt.body.ccodenode);
cbody.add_statement (new CCodeExpressionStatement (get_unref_expression (new CCodeIdentifier (stmt.variable_name), stmt.type_reference, null)));
var next_method = (Method) iterator_type.scope.lookup ("next");
var next_ccall = new CCodeFunctionCall (new CCodeIdentifier (next_method.get_cname ()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment