[vala] codegen: Fix memory leak on ignored return values
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Fix memory leak on ignored return values
- Date: Thu, 21 Oct 2010 18:48:10 +0000 (UTC)
commit d5e0dca9754c75b41e87ce7564c7d9cdfca377ba
Author: Jürg Billeter <j bitron ch>
Date: Thu Oct 21 20:47:29 2010 +0200
codegen: Fix memory leak on ignored return values
codegen/valaccodemethodcallmodule.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index 2fb9f6a..deef7a5 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -731,7 +731,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
return;
}
- if (expr.parent_node is ExpressionStatement) {
+ if (expr.parent_node is ExpressionStatement && !expr.value_type.is_disposable ()) {
ccode.add_expression (ccall_expr);
} else {
var result_type = itype.get_return_type ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]