if (current_method is CreationMethod && current_method.parent_symbol is Class) {
var cl = (Class) current_method.parent_symbol;
- var unref_call = get_unref_expression (new CCodeIdentifier ("self"), new ObjectType (cl), null);
- ccode.add_expression (unref_call);
+ ccode.add_expression (destroy_value (new GLibValue (new ObjectType (cl), new CCodeIdentifier ("self"))));
ccode.add_return (new CCodeConstant ("NULL"));
} else if (is_in_coroutine ()) {
ccode.add_return (new CCodeConstant ("FALSE"));